/* WooCommerce Product Catalog - Exact Design Match */

:root {
    --primary-green: #385854;
    --light-green: #3d6561;
    --gold-button: #d4a533;
    --text-black: #000000;
    --text-gray: #999999;
    --text-light: #cccccc;
    --border-light: #e8e8e8;
    --bg-card: #f0f0f0;
    --bg-white: #ffffff;
    --star-gold: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #fafafa;
}

.wc-product-catalog {
    max-width: 1320px;
    margin: 0 auto;
    padding: 30px 20px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-white);
}

/* ============================================
   HEADER SECTION
============================================ */

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
}

.tab-btn {
    padding: 10px 20px;
    background-color: transparent;
    color: var(--text-black);
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background-color: #f5f5f5;
}

.tab-btn.active {
    background-color: var(--primary-green);
    color: var(--bg-white);
}

/* Filter Toggle Button */
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--primary-green);
    color: var(--bg-white);
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.filter-toggle:hover {
    background-color: var(--light-green);
}

.filter-toggle.active {
    background-color: var(--light-green);
}

.filter-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.filter-toggle.active svg {
    transform: rotate(180deg);
}

/* ============================================
   FILTERS SECTION
============================================ */

.catalog-filters {
    display: none;
    gap: 12px;
    margin-bottom: 25px;
    overflow: hidden;
}

.catalog-filters.show {
    display: flex;
}

.filter-group {
    flex: 0 0 auto;
}

.filter-group label {
    display: none;
}

.filter-select {
    min-width: 140px;
    padding: 10px 35px 10px 14px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font-size: 13px;
    color: var(--text-black);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M5 6L0 0h10z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-green);
}

/* ============================================
   PRODUCT GRID
============================================ */

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

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

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

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

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

/* ============================================
   PRODUCT CARD
============================================ */

.product-card {
    background-color: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Product Image Container */
.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--bg-card);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Action Buttons (Heart & Cart) */
.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-white);
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.action-btn:hover {
    background-color: #f8f8f8;
    border-color: var(--primary-green);
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.wishlist-btn.active {
    background-color: #ffe8e8;
    border-color: #ff4444;
}

.wishlist-btn.active svg path {
    fill: #ff4444;
    stroke: #ff4444;
}

/* ============================================
   PRODUCT INFO
============================================ */

.product-info {
    padding: 12px 14px 14px;
    background-color: var(--bg-card);
}

/* Title and Rating Row */
.product-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.product-title {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-black);
    line-height: 1.2;
    margin: 0;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--primary-green);
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-black);
    white-space: nowrap;
}

.product-rating svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Product Price */
.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 18px;
    flex-wrap: wrap;
}

.price-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.current-price {
    font-weight: 700;
    color: var(--text-black);
    font-size: 24px;
}

.current-price .woocommerce-Price-amount {
    font-weight: 700;
    color: var(--text-black);
}

.old-price {
    font-size: 18px;
    color: #9ca3af;
    font-weight: 400;
}

.old-price del {
    text-decoration: line-through;
}

.old-price .woocommerce-Price-amount {
    color: #9ca3af;
}

/* Product Colors */
.product-colors {
    display: flex;
    align-items: center;
    gap: 5px;
}

.color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--bg-white);
    box-shadow: 0 0 0 1px #d0d0d0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.colors-count {
    font-size: 11px;
    color: var(--text-gray);
    margin-left: 2px;
}

/* ============================================
   FOOTER SECTION
============================================ */

.catalog-footer {
    text-align: center;
    padding: 20px 0;
}

.load-more-btn {
    padding: 11px 38px;
    background-color: var(--gold-button);
    color: var(--bg-white);
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: capitalize;
}

.load-more-btn:hover {
    background-color: #c09620;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 165, 51, 0.3);
}

/* ============================================
   UTILITY CLASSES
============================================ */

.no-products {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: var(--text-gray);
}

.products-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */

@media (max-width: 1200px) {
    .products-grid.columns-4,
    .products-grid.columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .wc-product-catalog {
        padding: 20px 15px;
    }

    .catalog-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    .category-tabs::-webkit-scrollbar {
        height: 3px;
    }

    .category-tabs::-webkit-scrollbar-thumb {
        background-color: #ccc;
        border-radius: 3px;
    }

    .products-grid.columns-3,
    .products-grid.columns-4,
    .products-grid.columns-5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .catalog-filters {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-group {
        flex: 1 1 calc(50% - 5px);
        min-width: 140px;
    }

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

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

    .tab-btn {
        font-size: 13px;
        padding: 9px 18px;
    }

    .catalog-filters {
        flex-direction: column;
    }

    .filter-group {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .product-title {
        font-size: 16px;
    }

    .product-rating {
        font-size: 14px;
    }

    .product-rating svg {
        width: 18px;
        height: 18px;
    }

    .current-price {
        font-size: 18px;
    }

    .old-price {
        font-size: 14px;
    }
}

/* ============================================
   ANIMATIONS
============================================ */

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

.product-card {
    animation: fadeInUp 0.4s ease-out;
}

.product-card:nth-child(1) { animation-delay: 0s; }
.product-card:nth-child(2) { animation-delay: 0.05s; }
.product-card:nth-child(3) { animation-delay: 0.1s; }
.product-card:nth-child(4) { animation-delay: 0.15s; }
.product-card:nth-child(5) { animation-delay: 0.2s; }
.product-card:nth-child(6) { animation-delay: 0.25s; }
.product-card:nth-child(7) { animation-delay: 0.3s; }
.product-card:nth-child(8) { animation-delay: 0.35s; }
