/**
 * eBiz Woo Pro - layout / typography / product-card refresh.
 *
 * Loaded LAST (see inc/enqueue-scripts.php) so it can override the older
 * stylesheets. Everything visual that changed in this pass lives here:
 *
 *   1. Design tokens + type scale (smaller, calmer text)
 *   2. Wide layout (containers)
 *   3. Header / hero
 *   4. Section headings + the shared .product-grid
 *   5. The shared product card (+ hover image switch)
 *   6. Shop / category archive (no sidebar)
 *   7. Single product page
 *   8. Trust bar + footer
 *   9. Cart / checkout / thank-you type sizes
 */

/* ==========================================================================
   1. TOKENS + TYPE SCALE
   ========================================================================== */
:root {
    --site-max: 1600px;
    --site-gutter: clamp(16px, 3vw, 48px);

    --ink: #2d2520;
    --ink-soft: #5f554d;
    --muted: #8b8179;
    --line: #e8dfd6;
    --soft: #f5efe8;
    --accent: #4b3a2e;

    --fs-xs: 0.72rem;
    --fs-sm: 0.8rem;
    --fs-base: 0.875rem;
    --fs-md: 1rem;
    --fs-lg: 1.2rem;
    --fs-xl: 1.6rem;
}

body {
    font-size: var(--fs-base);
    line-height: 1.6;
}

/* Bootstrap scales h1-h3 with the viewport (up to ~2.5rem). Pin them. */
h1, .h1 { font-size: var(--fs-xl); line-height: 1.25; }
h2, .h2 { font-size: 1.35rem;      line-height: 1.3; }
h3, .h3 { font-size: 1.1rem;       line-height: 1.35; }
h4, .h4 { font-size: 1rem;         line-height: 1.4; }
h5, .h5 { font-size: 0.92rem;      line-height: 1.4; }
h6, .h6 { font-size: 0.85rem;      line-height: 1.4; }

.fs-3 { font-size: 1.25rem !important; }
.fs-4 { font-size: 1.1rem !important; }
.fs-5 { font-size: 1rem !important; }
.fs-6 { font-size: 0.875rem !important; }

/* ==========================================================================
   2. WIDE LAYOUT
   ========================================================================== */
.container {
    --bs-gutter-x: calc(var(--site-gutter) * 2);
    max-width: var(--site-max);
}

.container-fluid {
    max-width: var(--site-max);
}

/* Full-bleed things must stay full-bleed. */
.hero-slider,
.topbar-slider {
    max-width: none;
}

/* ==========================================================================
   3. HEADER + HERO
   ========================================================================== */
.site-header,
.header-inner {
    height: auto;
    min-height: 72px;
}

.site-logo {
    min-width: 200px;
}

.site-logo img {
    max-height: 36px;
}

.site-logo-text {
    font-family: var(--font-heading-family);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--ink);
}

.header-icon i {
    font-size: 1.1rem;
}

.cart-count {
    width: 17px;
    height: 17px;
    font-size: 10px;
    top: -7px;
    right: -9px;
}

.mobile-menu-btn {
    font-size: 22px;
    width: 44px;
}

.mobile-menu-list a {
    font-size: 0.95rem;
}

.topbar-slider {
    height: 36px;
}

.typing-text {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

/* Hero */
.hero-slider .carousel-caption {
    left: clamp(20px, 6vw, 96px);
    bottom: 14%;
}

.hero-slider .carousel-caption h2 {
    font-size: clamp(1.4rem, 2.6vw, 2.4rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin-bottom: 18px;
    max-width: 22ch;
}

.hero-btn {
    min-width: 150px;
    height: 42px;
    padding: 0 26px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@media (max-width: 991px) {
    .site-header,
    .header-inner {
        min-height: 60px;
    }

    .site-logo {
        min-width: 0;
    }

    .site-logo img {
        max-height: 36px;
    }

    .hero-slider .carousel-caption {
        left: 18px;
        right: 18px;
        bottom: 22px;
    }

    .hero-slider .carousel-caption h2 {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }

    .hero-btn {
        height: 38px;
        min-width: 130px;
        font-size: 0.72rem;
    }
}

/* ==========================================================================
   4. SECTION HEADINGS + SHARED PRODUCT GRID
   ========================================================================== */
.home-section {
    margin-top: 48px;
    margin-bottom: 56px;
}

.home-section + .home-section {
    margin-top: 0;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section-head.is-centered {
    justify-content: center;
}

.section-title {
    font-family: var(--font-heading-family);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ink);
    margin: 0;
}

.section-link {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.section-link i {
    font-size: 0.8rem;
    vertical-align: -1px;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.section-link:hover {
    color: var(--ink);
}

.section-link:hover i {
    transform: translateX(3px);
}

/* The grid every product listing uses (shop, category, tag, search, home,
   related). One definition = one set of columns everywhere. */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 12px;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 34px 18px;
    }
}

@media (min-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 40px 24px;
    }
}

/* ==========================================================================
   5. PRODUCT CARD
   ========================================================================== */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--ink);
    background: transparent;
    transform: none;
}

.product-card:hover {
    transform: none;
}

/* --- image ------------------------------------------------------------ */
.product-card__media {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 10px;
    background: var(--soft);
}

.product-card__image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
    transition: opacity 0.45s ease, transform 0.7s ease;
}

/* Gallery image that fades in on hover. */
.product-card__img--hover {
    opacity: 0;
}

@media (hover: hover) {
    .product-card:hover .product-card__img--hover {
        opacity: 1;
    }

    .product-card:hover .product-card__img {
        transform: scale(1.03);
    }
}

.product-card.is-out-of-stock .product-card__img:not(.product-card__img--hover) {
    opacity: 0.55;
}

/* --- badge ------------------------------------------------------------ */
.product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--accent);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
    pointer-events: none;
}

.product-card__badge.is-soldout {
    background: rgba(45, 37, 32, 0.82);
    color: #fff;
}

/* --- text ------------------------------------------------------------- */
.product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding-top: 12px;
}

.product-card__title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 6px;
    font-family: var(--font-body-family);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-card__title a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-card__title a:hover {
    color: #7b604c;
}

.product-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin-top: auto;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
}

.product-card__price ins {
    order: 1;
    background: none;
    color: var(--ink);
    text-decoration: none;
}

.product-card__price del {
    order: 2;
    color: #a99f97;
    font-size: 0.78rem;
    font-weight: 400;
}

.product-card__price del bdi,
.product-card__price ins bdi,
.product-card__price bdi {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* --- button ----------------------------------------------------------- */
.product-card a.product-card__btn.add-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px;
    margin-top: 12px;
    padding: 0 !important;
    border: 1px solid var(--accent) !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--accent) !important;
    font-size: 0.7rem !important;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.product-card a.product-card__btn.add-cart-btn:hover {
    background: var(--accent) !important;
    color: #fff !important;
}

.product-card a.product-card__btn.add-cart-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.product-card .product-card__btn .cart-btn-inner {
    width: 100%;
}

.product-card .product-card__btn .cart-default,
.product-card .product-card__btn .cart-added {
    gap: 7px;
    white-space: nowrap;
}

.product-card .product-card__btn i {
    font-size: 0.95rem;
}

.product-card .product-card__btn.added-success {
    background: var(--accent) !important;
    color: #fff !important;
}

@media (max-width: 575px) {
    .product-card__title {
        font-size: 0.8rem;
    }

    .product-card__price {
        font-size: 0.82rem;
    }

    .product-card a.product-card__btn.add-cart-btn {
        height: 34px;
        font-size: 0.64rem !important;
        letter-spacing: 0.05em;
    }

    .product-card .product-card__btn .cart-default,
    .product-card .product-card__btn .cart-added {
        gap: 5px;
    }
}

/* ==========================================================================
   6. SHOP / CATEGORY ARCHIVE (no sidebar)
   ========================================================================== */
.shop-page {
    background: #fff;
}

.archive-hero {
    padding: 34px 0 6px;
    text-align: center;
}

.archive-breadcrumb {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.archive-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.archive-breadcrumb a:hover {
    color: var(--ink);
}

.archive-breadcrumb .crumb-sep {
    margin: 0 8px;
    opacity: 0.5;
}

.archive-title {
    margin: 0;
    font-family: var(--font-heading-family);
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ink);
}

.archive-description {
    max-width: 640px;
    margin: 10px auto 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.7;
}

.archive-description p:last-child {
    margin-bottom: 0;
}

.archive-content {
    padding-bottom: 72px;
}

.archive-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin: 22px 0 28px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.archive-chips {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.archive-chip {
    padding: 7px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.archive-chip:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.archive-chip.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.archive-tools {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.archive-count .woocommerce-result-count {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.archive-tools .woocommerce-ordering {
    margin: 0;
}

.archive-tools .woocommerce-ordering select {
    min-width: 190px;
    height: 38px;
    padding: 0 38px 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235f554d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m2 5 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 15px center;
    color: var(--ink-soft);
    font-size: 0.78rem;
    cursor: pointer;
}

.archive-tools .woocommerce-ordering select:focus {
    border-color: var(--ink);
    outline: none;
}

@media (max-width: 767px) {
    .archive-hero {
        padding-top: 24px;
    }

    .archive-title {
        font-size: 1.3rem;
    }

    .archive-toolbar {
        margin: 16px 0 20px;
        padding: 12px 0;
    }

    /* Chips become a single swipeable row instead of wrapping. */
    .archive-chips {
        flex: 1 1 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-inline: calc(var(--site-gutter) * -1);
        padding-inline: var(--site-gutter);
        scrollbar-width: none;
    }

    .archive-chips::-webkit-scrollbar {
        display: none;
    }

    .archive-tools {
        flex: 1 1 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .archive-tools .woocommerce-ordering select {
        min-width: 165px;
    }
}

/* Pagination */
.shop-pagination {
    margin-top: 52px;
}

.shop-pagination nav.woocommerce-pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
}

.shop-pagination nav.woocommerce-pagination ul.page-numbers li {
    margin: 0;
    border: 0;
}

.shop-pagination nav.woocommerce-pagination ul.page-numbers li .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.shop-pagination nav.woocommerce-pagination ul.page-numbers li a.page-numbers:hover {
    border-color: var(--ink);
    color: var(--ink);
    background: #fff;
}

.shop-pagination nav.woocommerce-pagination ul.page-numbers li .page-numbers.current {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.shop-pagination nav.woocommerce-pagination ul.page-numbers li .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* Empty state */
.archive-empty {
    padding: 72px 0;
    text-align: center;
    color: var(--muted);
}

.archive-empty i {
    display: block;
    margin-bottom: 10px;
    font-size: 2rem;
}

.archive-empty p {
    margin-bottom: 18px;
    font-size: 0.9rem;
}

.archive-empty-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.archive-empty-btn:hover {
    color: #fff;
    background: var(--ink);
}

/* ==========================================================================
   7. SINGLE PRODUCT PAGE
   ========================================================================== */
.product-page {
    padding-top: 32px;
}

.product-shell {
    max-width: var(--site-max);
    padding-inline: var(--site-gutter);
}

.product-page .product-title {
    max-width: none;
    font-size: clamp(1.3rem, 1.5vw + 0.5rem, 1.65rem);
    line-height: 1.35;
    margin-bottom: 12px !important;
}

.product-page .product-sub-title {
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    margin-bottom: 8px;
}

.product-page .product-review-bar {
    margin-bottom: 16px !important;
    font-size: 0.8rem;
}

.product-page .sale-price {
    font-size: 1.5rem;
    margin-top: 6px;
}

.product-page .sale-price .price-only {
    font-size: 0.68rem;
}

.product-page .old-price {
    font-size: 0.9rem;
}

.product-page .custom-price-box {
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.product-page .custom-price-box .discount-badge {
    font-size: 0.7rem;
    padding: 4px 12px !important;
}

.product-page .variations_form .woocommerce-variation-price,
.product-page .variable-price-range {
    font-size: 1.2rem;
}

.product-page .product-short-copy {
    font-size: 0.88rem;
    line-height: 1.7;
    max-width: none;
}

.product-page .badge-live .text {
    font-size: 0.8rem;
}

.product-page .benefit-content h4 {
    font-size: 0.75rem;
}

.product-page .attribute-row {
    font-size: 0.8rem;
}

.product-page .qty-wrap {
    height: 46px;
    min-width: 138px;
}

.product-page .qty-btn {
    font-size: 1.15rem;
    height: 34px;
    width: 34px;
}

.product-page .qty-input {
    font-size: 0.9rem;
    height: 42px;
}

.product-page .btn-add-cart,
.product-page .single_add_to_cart_button {
    min-height: 46px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.product-page #custom-buy-now button {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 12px 0;
}

.product-page #custom-buy-now .buy-now-desc {
    font-size: 0.72rem;
}

.product-page #wa-buy-now {
    font-size: 0.8rem !important;
    padding: 12px 0;
    margin: 16px auto;
}

.product-page .basic__step-container .step-box__basic .icon__step-box i {
    font-size: 1.15rem;
}

.product-page .step-box__basic .title__content,
.product-page .step-box__basic .description__content {
    font-size: 12px !important;
}

.product-page .accordion-button {
    font-size: 0.85rem;
    padding: 14px 0;
}

.product-page .accordion-body {
    font-size: 0.85rem;
    line-height: 1.7;
}

.product-page .share-product h5 {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
}

/* Gallery: wide screens no longer produce a poster-tall image. */
@media (min-width: 992px) {
    .main-image-wrap img {
        aspect-ratio: 4 / 5;
        max-height: min(860px, calc(100vh - 110px));
    }
}

/* Sections under the fold */
.related-products-section {
    margin-top: 56px;
    margin-bottom: 64px;
}

.related-products-section .section-title,
.related-products-title {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.custom-reviews .reviews-heading {
    font-size: 1.2rem;
    letter-spacing: 0.04em;
}

.avg-rating {
    font-size: 1.6rem;
}

.review-form-box h2 {
    font-size: 1.3rem;
}

.review-success-message h4 {
    font-size: 1.1rem;
}

.success-popup-box h2 {
    font-size: 1.4rem;
}

.cod-total-amount {
    font-size: 1.15rem;
}

/* ==========================================================================
   8. TRUST BAR + FOOTER
   ========================================================================== */
.trust-section {
    padding: 36px 0 12px;
}

.trust-item {
    padding: 22px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fffcf8;
    box-shadow: none;
    backdrop-filter: none;
}

.trust-item:hover {
    transform: none;
    box-shadow: none;
    border-color: #d9c9b9;
}

.trust-item .trust-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--soft);
    box-shadow: none;
    color: var(--accent);
}

.trust-item:hover .trust-icon {
    transform: none;
}

.trust-item .trust-icon i {
    color: var(--accent);
    font-size: 1.05rem;
}

.trust-item h4 {
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 500;
}

.trust-item p {
    color: var(--muted);
    font-size: 0.78rem;
}

.site-footer {
    padding-top: 48px;
    background: #f7f2ec;
}

.footer-title {
    margin-bottom: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.footer-about,
.footer-contact p,
.footer-links a,
.footer-contact a {
    font-size: 0.85rem;
}

.footer-about {
    line-height: 1.8;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-contact p {
    margin-bottom: 12px;
}

.footer-bottom {
    margin-top: 44px;
    padding: 22px 0;
}

.footer-bottom p {
    font-size: 0.78rem;
}

@media (max-width: 991px) {
    .footer-title {
        font-size: 0.78rem;
        margin-bottom: 16px;
    }

    .site-footer {
        padding-top: 40px;
    }
}

/* Mini cart / search drawers */
.mini-cart-header h5,
.search-header h6 {
    font-size: 0.95rem;
}

.close-btn {
    font-size: 1.6rem;
}

/* ==========================================================================
   9. CART / CHECKOUT / THANK-YOU TYPE SIZES
   ========================================================================== */
.cart-heading {
    font-size: 1.35rem;
}

.cart-details h3 {
    font-size: 0.95rem;
}

.cart-price {
    font-size: 1rem;
}

.cart-attributes {
    font-size: 0.85rem;
}

.cart-remove {
    font-size: 1.1rem;
}

.summary-row {
    font-size: 0.95rem;
}

.summary-box h3,
.checkout-title {
    font-size: 1.05rem;
}

.sf-success h1 {
    font-size: 1.5rem;
}

@media (max-width: 767px) {
    .cart-details h3 {
        font-size: 0.9rem;
    }

    .cart-price {
        font-size: 0.95rem;
    }

    .summary-box h3 {
        font-size: 1.05rem;
    }

    .summary-row {
        font-size: 0.9rem;
    }

    .sf-success h1 {
        font-size: 1.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-card__img,
    .product-card a.product-card__btn.add-cart-btn,
    .section-link i {
        transition: none !important;
    }
}
