/* DRYPE Products Archive Styles - FIGMA FULL COVERAGE VERSION */
/* Updated: Removed most !important to allow Elementor overrides */

.drype-products-archive {
    position: relative;
    padding: 20px 0;
}

/* Category Tabs */
.drype-category-tabs {
    margin-bottom: 40px;
    border-bottom: 2px solid #e0e0e0;
}

.category-tab-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    overflow-x: auto;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.category-tab-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.category-tab-list li {
    position: relative;
    white-space: nowrap;
}

.category-tab-list a {
    display: block;
    padding: 15px 0;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.category-tab-list li.active a,
.category-tab-list a:hover {
    color: #000;
}

.category-tab-list li.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #000;
}

/* Products Grid */
.drype-products-grid {
    display: grid;
    gap: 30px;
}

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

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

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

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

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

/* Product Card - FIGMA STYLE WITH FULL IMAGE COVERAGE */
.drype-product-card {
    background: #ffffff;
    border-radius: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
}

.drype-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Product Link Overlay */
.drype-product-card .product-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    text-decoration: none;
}

/* Interactive elements above overlay */
.drype-product-card .product-badge,
.drype-product-card .variation-button,
.drype-product-card .color-swatch,
.drype-product-card .drype-add-to-cart,
.drype-product-card .swatch-arrow {
    position: relative;
    z-index: 2;
}

/* Product Highlight */
.drype-product-card .product-highlight {
    background: #FFD700;
    color: #000;
    padding: 5px 10px;
    border-radius: 0 0 5px 0;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    align-self: flex-start;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    margin: 0;
}

/* Product Image Section - FIGMA STYLE: FULL COVERAGE */
.drype-product-card .product-image-section {
    position: relative;
    width: 100%;
    height: 280px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

/* Product Badge */
.drype-product-card .product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #FF0000;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 5;
}

.drype-product-card .product-badge.badge-new {
    background: #4CAF50;
}

.drype-product-card .product-badge.badge-bestseller {
    background: #FF9800;
}

.drype-product-card .product-badge.badge-limited {
    background: #F44336;
}

/* Product Gallery Carousel - FIGMA STYLE: COMPLETE COVERAGE */
.drype-product-card .product-gallery-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
    border-radius: 15px 15px 0 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure Swiper wrapper fills completely */
.drype-product-card .product-gallery-carousel .swiper {
    width: 100%;
    height: 100%;
    border-radius: 15px 15px 0 0;
}

.drype-product-card .product-gallery-carousel .swiper-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Slides must fill completely */
.drype-product-card .product-gallery-carousel .swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition-property: transform;
    overflow: hidden;
}

/* Images - FIGMA STYLE: COMPLETE COVERAGE WITH CROP */
.drype-product-card .product-gallery-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 15px 15px 0 0;
    border: none;
}

/* Pagination positioning */
.drype-product-card .product-gallery-carousel .swiper-pagination {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.drype-product-card .product-gallery-carousel .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    opacity: 1;
    margin: 0 4px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.drype-product-card .product-gallery-carousel .swiper-pagination-bullet-active {
    background: #fff;
    border-color: #000;
}

/* Hide pagination for single images */
.drype-product-card .product-gallery-carousel.single-image .swiper-pagination {
    display: none;
}

/* Hide pagination when variation selected */
.drype-product-card.variation-selected .swiper-pagination {
    display: none;
}

/* Content area with padding restored */
.drype-product-card .product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Product Info */
.drype-product-card .product-info {
    margin-bottom: 15px;
}

.drype-product-card .product-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.drype-product-card .product-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
    line-height: 1.2;
    flex-grow: 1;
}

.drype-product-card .cocktail-count-simple {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    margin-left: 10px;
}

.drype-product-card .product-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
    display: block;
}

/* Product Variations */
.drype-product-card .product-variations {
    margin-bottom: 15px;
}

/* Variation Buttons */
.drype-product-card .variation-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.drype-product-card .variation-button {
    flex: 1;
    min-width: 60px;
    max-width: 110px;
    padding: 8px 10px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    position: relative;
    z-index: 2;
}

.drype-product-card .variation-button:hover {
    background: #e8e8e8;
}

.drype-product-card .variation-button.selected {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.drype-product-card .variation-button .variation-label {
    text-transform: uppercase;
}

/* Product Variations - REBUILT FROM SCRATCH */
.drype-product-card .product-variations {
    margin-bottom: 15px;
}

/* Variation Buttons (for text variations like Classic, Signature, etc.) */
.drype-product-card .variation-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.drype-product-card .variation-button {
    flex: 1;
    min-width: 60px;
    max-width: 110px;
    padding: 8px 10px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    position: relative;
    z-index: 2;
}

.drype-product-card .variation-button:hover {
    background: #e8e8e8;
}

.drype-product-card .variation-button.selected {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.drype-product-card .variation-button .variation-label {
    text-transform: uppercase;
}

/* Color Swatches Container - CLEAN REBUILD */
.drype-product-card .variation-swatches-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.drype-product-card .variation-swatches {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.drype-product-card .variation-swatches::-webkit-scrollbar {
    display: none;
}

/* Color Swatch Circles - 14px size */
.drype-product-card .color-swatch {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.drype-product-card .color-swatch:hover {
    border-color: #666;
    filter: brightness(1.15);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.drype-product-card .color-swatch.selected {
    border-color: #000;
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.drype-product-card .color-swatch.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 8px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0,0,0,0.8);
}

/* Arrow Button - 14px to match swatches */
.drype-product-card .swatch-arrow {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 10px;
    color: #666;
    transition: all 0.2s;
    padding: 0;
    margin: 0;
    margin-left: 8px;
}

.drype-product-card .swatch-arrow:hover {
    background: #f5f5f5;
    border-color: #999;
    color: #333;
}

/* Product Recipes */
.drype-product-card .product-recipes {
    margin-bottom: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
}

.drype-product-card .recipes-label {
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 5px;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
}

.drype-product-card .recipes-list {
    font-size: 12px;
    margin: 0;
    color: #333;
    line-height: 1.5;
}

/* Product Footer */
.drype-product-card .product-footer {
    margin-top: auto;
    padding-top: 0;
}

/* DRYPE Add to Cart Button */
.drype-product-card .drype-add-to-cart {
    width: 100%;
    padding: 14px 20px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.drype-product-card .drype-add-to-cart:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: #fff;
    text-decoration: none;
}

.drype-product-card .drype-add-to-cart .button-text {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

/* Hide the complex price structure and use pseudo-element */
.drype-product-card .drype-add-to-cart .drype-button-price {
    display: none;
}

/* Create a pseudo-element for the price */
.drype-product-card .drype-add-to-cart::after {
    content: attr(data-price);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.drype-product-card .drype-add-to-cart.loading {
    opacity: 0.6;
    pointer-events: none;
}

.drype-product-card .drype-add-to-cart.added {
    background: #4CAF50;
}

/* Loading State */
.drype-product-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Hidden Clean Price Container */
.drype-product-card .drype-clean-price {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

.drype-product-card .drype-clean-price * {
    display: none !important;
}

/* Loading State Animation */
.drype-product-card.loading-variation {
    pointer-events: none;
}

.drype-product-card.loading-variation .product-gallery-carousel {
    position: relative;
}

.drype-product-card.loading-variation .product-gallery-carousel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #333;
    border-radius: 50%;
    animation: drype-spin 0.8s linear infinite;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@keyframes drype-spin {
    to { 
        transform: translate(-50%, -50%) rotate(360deg); 
    }
}

/* Dim image while loading */
.drype-product-card.loading-variation .product-gallery-carousel img {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* Visual indicator when showing variation image */
.product-gallery-carousel.showing-variation {
    border: 2px solid #4CAF50;
    border-radius: 15px 15px 0 0;
}

/* Smooth image transitions */
.drype-product-card .product-gallery-carousel img {
    transition: opacity 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .drype-products-grid.columns-5,
    .drype-products-grid.columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .drype-products-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .drype-products-grid,
    .drype-products-grid.columns-2,
    .drype-products-grid.columns-3,
    .drype-products-grid.columns-4,
    .drype-products-grid.columns-5,
    .drype-products-grid.columns-6 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
    
    .drype-product-card .product-content {
        padding: 15px;
    }
    
    .drype-product-card .product-title {
        font-size: 16px;
    }
    
    .drype-product-card .variation-button {
        font-size: 10px;
        padding: 6px 8px;
        min-width: 50px;
    }
    
    .drype-product-card .drype-add-to-cart {
        font-size: 12px;
        padding: 12px 16px;
    }
    
    .drype-product-card .drype-add-to-cart .button-text,
    .drype-product-card .drype-add-to-cart .drype-button-price {
        font-size: 12px;
    }
    
    /* Category tabs responsive */
    .category-tabs-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .category-tab-list {
        width: 100%;
        gap: 20px;
    }
    
    .drype-vat-toggle {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .drype-products-grid,
    .drype-products-grid.columns-2,
    .drype-products-grid.columns-3,
    .drype-products-grid.columns-4,
    .drype-products-grid.columns-5,
    .drype-products-grid.columns-6 {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .category-tab-list {
        gap: 15px;
    }
    
    .category-tab-list a {
        font-size: 12px;
        padding: 12px 0;
    }
}