/* ZIVELA product cards – scoped so other WooCommerce pages are untouched */
.zivela-bestsellers-section,
.zivela-bestsellers-grid-only {
    --z-ink: #192633;
    --z-gold: #b99152;
    --z-gold2: #d8bd8d;
    --z-cream: #fbf8f3;
    --z-muted: #777b80;
    --z-line: #ece6de;
    color: var(--z-ink);
    direction: rtl;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.9;
}

.zivela-bestsellers-section *,
.zivela-bestsellers-grid-only * { box-sizing: border-box; }

.zivela-bestsellers-section a,
.zivela-bestsellers-grid-only a { color: inherit; text-decoration: none !important; }

.zivela-bestsellers-section.z-section { padding: 32px 0; }
.zivela-bestsellers-section .z-wrap { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.zivela-bestsellers-section .z-section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.zivela-bestsellers-section .z-title { display: flex; align-items: center; gap: 11px; margin: 0; color: var(--z-ink); font-family: inherit; font-size: 22px; line-height: 1.6; font-weight: 600; }
.zivela-bestsellers-section .z-title::before { content: ""; display: inline-block; width: 34px; height: 2px; background: var(--z-gold); }
.zivela-bestsellers-section .z-all { font-size: 11px; white-space: nowrap; }
.zivela-bestsellers-section .z-all:hover { color: var(--z-gold); }

.zivela-bestsellers-section .z-products,
.zivela-bestsellers-grid-only .z-products { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; width: 100%; }

.zivela-bestsellers-section .z-product,
.zivela-bestsellers-grid-only .z-product { min-width: 0; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--z-line); border-radius: 0; box-shadow: none; transition: transform .25s, border-color .25s; }
.zivela-bestsellers-section .z-product:hover,
.zivela-bestsellers-grid-only .z-product:hover { transform: translateY(-4px); border-color: #d9c49f; }

.zivela-bestsellers-section .z-product-img,
.zivela-bestsellers-grid-only .z-product-img { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.1; padding: 0; overflow: hidden; background: #f6f0e9; }
.zivela-bestsellers-section .z-product-img img,
.zivela-bestsellers-grid-only .z-product-img img { display: block; width: 100% !important; height: 100% !important; margin: 0 !important; object-fit: cover; object-position: center; transition: transform .35s; }
.zivela-bestsellers-section .z-product:hover .z-product-img img,
.zivela-bestsellers-grid-only .z-product:hover .z-product-img img { transform: scale(1.045); }

.zivela-bestsellers-section .z-badge,
.zivela-bestsellers-grid-only .z-badge { position: absolute; top: 8px; right: 8px; z-index: 2; display: inline-block; margin: 0; padding: 2px 7px; background: var(--z-gold); color: #fff; border: 0; border-radius: 0; font-family: inherit; font-size: 9px; font-weight: 400; line-height: 1.8; }
.zivela-bestsellers-section .z-heart,
.zivela-bestsellers-grid-only .z-heart { position: absolute; top: 7px; left: 7px; z-index: 2; display: grid; place-items: center; width: 27px; height: 27px; margin: 0; padding: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: #4e5961; font-size: 17px; line-height: 1; }

.zivela-bestsellers-section .z-pinfo,
.zivela-bestsellers-grid-only .z-pinfo { padding: 9px 4px 5px; }
.zivela-bestsellers-section .z-pinfo h3,
.zivela-bestsellers-grid-only .z-pinfo h3 { min-height: 42px; margin: 0 0 6px; padding: 0; color: var(--z-ink); font-family: inherit; font-size: 11px; font-weight: 500; line-height: 1.9; }
.zivela-bestsellers-section .z-pinfo h3 a,
.zivela-bestsellers-grid-only .z-pinfo h3 a { color: inherit !important; text-decoration: none !important; }
.zivela-bestsellers-section .z-pmeta,
.zivela-bestsellers-grid-only .z-pmeta { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.zivela-bestsellers-section .z-price,
.zivela-bestsellers-grid-only .z-price { min-width: 0; color: var(--z-ink); font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1.8; white-space: nowrap; }
.zivela-bestsellers-section .z-price del,
.zivela-bestsellers-grid-only .z-price del { display: inline-block; margin-left: 4px; color: #a1a1a1; font-size: 9px; font-weight: 400; opacity: 1; }
.zivela-bestsellers-section .z-price ins,
.zivela-bestsellers-grid-only .z-price ins { color: inherit; background: transparent; font-weight: 700; text-decoration: none; }
.zivela-bestsellers-section .z-price .woocommerce-Price-currencySymbol,
.zivela-bestsellers-grid-only .z-price .woocommerce-Price-currencySymbol { font-size: inherit; }

.zivela-bestsellers-section .z-cart,
.zivela-bestsellers-grid-only .z-cart { display: grid !important; place-items: center; width: 30px !important; height: 30px !important; min-width: 30px !important; min-height: 30px !important; flex: 0 0 30px; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: #f7e9d7 !important; color: #a37a3d !important; font-family: Arial, sans-serif !important; font-size: 17px !important; font-weight: 400 !important; line-height: 1 !important; text-decoration: none !important; text-align: center; box-shadow: none !important; text-shadow: none !important; }
.zivela-bestsellers-section .z-cart:hover,
.zivela-bestsellers-grid-only .z-cart:hover { background: var(--z-gold) !important; color: #fff !important; }
.zivela-bestsellers-section .z-cart.loading,
.zivela-bestsellers-grid-only .z-cart.loading { opacity: .65; }

.zivela-bestsellers-section .zivela-wcb-empty,
.zivela-bestsellers-grid-only .zivela-wcb-empty,
.zivela-wcb-notice { grid-column: 1 / -1; margin: 0; padding: 14px; color: #777b80; font-size: 12px; }

@media (max-width: 1000px) {
    .zivela-bestsellers-section .z-products,
    .zivela-bestsellers-grid-only .z-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .zivela-bestsellers-section.z-section { padding: 24px 0; }
    .zivela-bestsellers-section .z-wrap { width: calc(100% - 26px); }
    .zivela-bestsellers-section .z-section-head { gap: 10px; margin-bottom: 14px; }
    .zivela-bestsellers-section .z-title { gap: 8px; font-size: 18px; }
    .zivela-bestsellers-section .z-title::before { width: 22px; }
    .zivela-bestsellers-section .z-all { font-size: 10px; }
    .zivela-bestsellers-section .z-products,
    .zivela-bestsellers-grid-only .z-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .zivela-bestsellers-section .z-product,
    .zivela-bestsellers-grid-only .z-product { padding: 5px; }
    .zivela-bestsellers-section .z-pinfo,
    .zivela-bestsellers-grid-only .z-pinfo { padding: 8px 3px 3px; }
    .zivela-bestsellers-section .z-pinfo h3,
    .zivela-bestsellers-grid-only .z-pinfo h3 { min-height: 41px; font-size: 11px; }
    .zivela-bestsellers-section .z-price,
    .zivela-bestsellers-grid-only .z-price { font-size: 10px; white-space: normal; }
    .zivela-bestsellers-section .z-cart,
    .zivela-bestsellers-grid-only .z-cart { width: 27px !important; height: 27px !important; min-width: 27px !important; min-height: 27px !important; flex-basis: 27px; }
}


/* Mobile editorial layout: first four product photos are taller; remaining cards are compact. */
.zivela-bestsellers-section .z-coming-soon .z-price,
.zivela-bestsellers-grid-only .z-coming-soon .z-price { color: var(--z-gold); font-weight: 700; }
.zivela-coming-soon-price { display: inline-block; color: #a37a3d; font-size: 12px; font-weight: 700; }
@media (max-width: 560px) {
  .zivela-bestsellers-section .z-products .z-product:nth-child(-n+4) .z-product-img,
  .zivela-bestsellers-grid-only .z-products .z-product:nth-child(-n+4) .z-product-img { aspect-ratio: 1 / 1.42; }
  .zivela-bestsellers-section .z-products .z-product:nth-child(n+5) .z-product-img,
  .zivela-bestsellers-grid-only .z-products .z-product:nth-child(n+5) .z-product-img { aspect-ratio: 1 / .82; }
}
