/**
 * Wesly Theme – WooCommerce Styles
 *
 * Dedicated styling for WooCommerce catalogue, archive, product cards,
 * single product details, interactive gallery, and WhatsApp inquiry CTA.
 *
 * @package Wesly
 * @since   2.0.0
 */

/* ============================================================
   1. BREADCRUMBS
   ============================================================ */
.breadcrumb-bar {
    background-color: var(--wesly-light, #f8f6f3);
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.85rem;
}

.breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb__link {
    color: var(--wesly-mid, #666666);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb__link:hover {
    color: var(--wesly-accent, #8B6914);
}

.breadcrumb__separator {
    color: #cccccc;
    user-select: none;
}

.breadcrumb__item--current {
    color: var(--wesly-black, #0a0a0a);
    font-weight: 500;
}

/* ============================================================
   2. ARCHIVE HEADER & FILTER BAR
   ============================================================ */
.archive-header {
    background-color: var(--wesly-cream, #faf9f7);
    padding: 60px 0 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.archive-header__title {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 600;
    color: var(--wesly-black, #0a0a0a);
    margin: 8px 0 16px;
    line-height: 1.2;
}

.archive-header__desc {
    max-width: 680px;
    margin: 0 auto;
    color: var(--wesly-mid, #5a5a5a);
    font-size: 1.05rem;
    line-height: 1.6;
}

.filter-bar {
    background: #ffffff;
    padding: 24px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 72px;
    z-index: 20;
    backdrop-filter: blur(8px);
}

.filter-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.filter-bar__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    background: transparent;
    border: 1px solid #e0deda;
    border-radius: 9999px;
    padding: 7px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--wesly-dark, #1a1a1a);
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
}

.filter-pill:hover,
.filter-pill:focus-visible {
    border-color: var(--wesly-accent, #8B6914);
    color: var(--wesly-accent, #8B6914);
}

.filter-pill--active {
    background: var(--wesly-black, #0a0a0a);
    border-color: var(--wesly-black, #0a0a0a);
    color: #ffffff !important;
}

.filter-bar__controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-search-wrap {
    position: relative;
}

.filter-search-input {
    border: 1px solid #e0deda;
    border-radius: 9999px;
    padding: 7px 16px 7px 34px;
    font-size: 0.85rem;
    width: 200px;
    transition: all 0.25s ease;
}

.filter-search-input:focus {
    width: 250px;
    border-color: var(--wesly-black, #0a0a0a);
    outline: none;
}

.filter-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888888;
    pointer-events: none;
    font-size: 0.85rem;
}

.filter-sort-select {
    border: 1px solid #e0deda;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 0.85rem;
    background: #ffffff;
    color: var(--wesly-dark, #1a1a1a);
    cursor: pointer;
}

/* ============================================================
   3. PRODUCT GRID & CARDS
   ============================================================ */
.products-grid-section {
    padding: 50px 0 80px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.products-grid--4col {
    grid-template-columns: repeat(4, 1fr);
}

.product-card {
    background: #ffffff;
    border: 1px solid #f0eee9;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
    border-color: #e5e0d8;
}

.product-card__thumb-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fcfbf9;
    display: block;
}

.product-card__img-main,
.product-card__img-hover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.4s ease;
}

.product-card__img-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

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

.product-card:hover .product-card__img-hover {
    opacity: 1;
    transform: scale(1.05);
}

.product-card__badge-cat {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

.product-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card__model {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--wesly-accent, #8B6914);
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
}

.product-card__title {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 10px;
}

.product-card__title a {
    color: var(--wesly-black, #0a0a0a);
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-card__title a:hover {
    color: var(--wesly-accent, #8B6914);
}

.product-card__desc {
    color: var(--wesly-mid, #666666);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

.btn-card-view {
    border: 1px solid #dcd7cf;
    background: #ffffff;
    color: var(--wesly-dark, #1a1a1a);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-card-view:hover {
    background: #f4f2ee;
    border-color: #c5bfb4;
}

.btn-card-wa {
    background: #25D366;
    border: 1px solid #25D366;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-card-wa:hover {
    background: #1eb857;
    border-color: #1eb857;
    color: #ffffff;
}

.btn-card-wa svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ============================================================
   4. SINGLE PRODUCT DETAIL PAGE
   ============================================================ */
.product-detail-section {
    padding: 50px 0 70px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 52% 44%;
    gap: 4%;
    align-items: start;
}

/* Gallery */
.product-gallery {
    position: sticky;
    top: 90px;
}

.product-gallery__main-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #fbf9f6;
    border: 1px solid #eeebe5;
    aspect-ratio: 4 / 3;
}

.product-gallery__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.product-gallery__badge {
    position: absolute;
    bottom: 18px;
    left: 18px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-family: var(--font-mono, monospace);
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.product-gallery__thumbs {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.product-gallery__thumb {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: #fbf9f6;
    transition: all 0.2s ease;
}

.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-gallery__thumb.is-active,
.product-gallery__thumb:hover {
    border-color: var(--wesly-accent, #8B6914);
}

/* Summary Box */
.product-summary__meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.product-summary__cat {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wesly-accent, #8B6914);
}

.product-summary__sku {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    color: #888888;
}

.product-summary__title {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 10px;
    color: var(--wesly-black, #0a0a0a);
}

.product-summary__tagline {
    font-size: 0.95rem;
    color: var(--wesly-mid, #666666);
    font-style: italic;
    margin-bottom: 18px;
}

.product-summary__short-desc {
    font-size: 1rem;
    line-height: 1.65;
    color: #444444;
}

.product-summary__divider {
    border: 0;
    height: 1px;
    background: #eeebe5;
    margin: 24px 0;
}

/* Quick specs */
.product-quick-specs {
    margin-bottom: 28px;
}

.product-quick-specs__title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--wesly-black, #0a0a0a);
    margin-bottom: 12px;
}

.product-quick-specs__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.product-quick-specs__item {
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
}

.product-quick-specs__label {
    color: #888888;
    font-size: 0.78rem;
    margin-bottom: 2px;
}

.product-quick-specs__value {
    color: var(--wesly-black, #0a0a0a);
    font-weight: 500;
}

/* CTA Box */
.product-cta-box {
    background: var(--wesly-cream, #faf9f7);
    border: 1px solid #ece8e1;
    border-radius: 14px;
    padding: 26px;
}

.product-cta-box__pricing-note {
    margin-bottom: 20px;
}

.pricing-label {
    display: block;
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--wesly-black, #0a0a0a);
}

.pricing-sub {
    font-size: 0.85rem;
    color: #666666;
    margin-top: 4px;
    display: block;
}

.product-cta-box__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn--whatsapp-large {
    background: #25D366;
    color: #ffffff;
    border-radius: 10px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.25);
}

.btn--whatsapp-large:hover {
    background: #1ea952;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35);
    color: #ffffff;
}

.btn--whatsapp-large .btn__icon svg {
    width: 26px;
    height: 26px;
    fill: #ffffff;
}

.btn--whatsapp-large .btn__text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
}

.btn--whatsapp-large .btn__text strong {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

.btn--whatsapp-large .btn__text small {
    font-size: 0.78rem;
    opacity: 0.9;
}

.btn--call {
    border: 1px solid #d5d0c8;
    background: transparent;
    color: var(--wesly-dark, #1a1a1a);
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn--call:hover {
    border-color: var(--wesly-black, #0a0a0a);
    background: #ffffff;
}

.btn--call svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.product-cta-box__guarantee {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eae5dc;
    font-size: 0.8rem;
    color: #666666;
}

/* ============================================================
   5. PRODUCT TABS
   ============================================================ */
.product-info-tabs-section {
    padding: 40px 0 70px;
    background: #ffffff;
    border-top: 1px solid #f0eee9;
}

.product-tabs__nav {
    display: flex;
    gap: 20px;
    border-bottom: 2px solid #eae6df;
    margin-bottom: 34px;
}

.product-tabs__btn {
    background: transparent;
    border: none;
    padding: 12px 6px;
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: 1.15rem;
    color: #777777;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.product-tabs__btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    transition: background 0.2s ease;
}

.product-tabs__btn.is-active {
    color: var(--wesly-black, #0a0a0a);
    font-weight: 600;
}

.product-tabs__btn.is-active::after {
    background: var(--wesly-accent, #8B6914);
}

.product-tabs__panel {
    display: none;
}

.product-tabs__panel.is-active {
    display: block;
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Spec Table */
.wesly-spec-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 900px;
    font-size: 0.95rem;
}

.wesly-spec-table th,
.wesly-spec-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #eeebe5;
    text-align: left;
}

.wesly-spec-table th {
    background: #faf8f5;
    width: 35%;
    font-weight: 600;
    color: var(--wesly-dark, #1a1a1a);
}

.wesly-spec-table td {
    color: #444444;
}

/* Craft cards in tab */
.craft-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.craft-card {
    background: var(--wesly-cream, #faf9f7);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eee9e0;
}

.craft-card__num {
    font-family: var(--font-mono, monospace);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--wesly-accent, #8B6914);
    display: block;
    margin-bottom: 10px;
}

.craft-card h3 {
    font-size: 1.15rem;
    margin: 0 0 10px;
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.craft-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666666;
    margin: 0;
}

/* ============================================================
   6. MOBILE STICKY BAR
   ============================================================ */
.mobile-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e0deda;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.1);
    padding: 12px 20px;
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-sticky-bar.is-visible {
    transform: translateY(0);
}

.mobile-sticky-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.mobile-sticky-bar__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--wesly-black, #0a0a0a);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.mobile-sticky-bar__model {
    font-size: 0.75rem;
    color: #777777;
    font-family: var(--font-mono, monospace);
    display: block;
}

.btn--whatsapp-compact {
    background: #25D366;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    flex-shrink: 0;
}

.btn--whatsapp-compact svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ============================================================
   7. NO PRODUCTS FOUND STATE
   ============================================================ */
.no-products-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--wesly-cream, #faf9f7);
    border-radius: 14px;
    border: 1px dashed #dcd8cf;
}

.no-products-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.no-products-found h3 {
    font-size: 1.3rem;
    margin: 0 0 8px;
}

.no-products-found p {
    color: #666666;
    margin: 0;
}

/* ============================================================
   8. RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}

@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-gallery {
        position: static;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .craft-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .filter-bar {
        position: static;
        padding: 16px 0;
    }

    .filter-bar__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar__controls {
        flex-direction: column;
    }

    .filter-search-input {
        width: 100%;
    }

    .filter-search-input:focus {
        width: 100%;
    }

    .filter-sort-select {
        width: 100%;
    }

    .mobile-sticky-bar {
        display: block;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .product-card__actions {
        grid-template-columns: 1fr;
    }

    .product-quick-specs__list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
