/* =============================================
   PRODUCT CARDS PREMIUM
   EP Collections - Unified Premium Design
   Load after all other CSS files
   ============================================= */

/* ---- Grid Layout ---- */
body .product-grid,
body .products-grid:not(.womens-products__grid),
body .related-products-grid,
body.shop-page #productsGrid.products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
}

/* One visible product after filter — full card width, not 1/4 of a squeezed grid */
body.shop-page #productsGrid.products-grid.is-single-result {
    grid-template-columns: minmax(280px, 380px) !important;
    justify-content: start;
    justify-items: stretch;
    width: 100% !important;
    max-width: 100% !important;
}

body.shop-page #productsGrid.products-grid.is-single-result > .product-card {
    width: 100% !important;
    max-width: 380px !important;
    min-width: 280px !important;
}

/* ---- Product Card Base ---- */
body .product-card,
body.shop-page #productsGrid.products-grid > .product-card,
body .related-products-grid .product-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    overflow: visible !important;
    height: auto !important;
    min-width: 0 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    border: none !important;
    transform: none !important;
    position: relative !important;
}

body .product-card:hover,
body.shop-page #productsGrid.products-grid > .product-card:hover,
body .related-products-grid .product-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
}

/* ---- Image Container ---- */
body .product-card__image,
body.shop-page #productsGrid.products-grid .product-card__image,
body .related-products-grid .product-card__image {
    position: relative !important;
    aspect-ratio: 3 / 4 !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #fafafa, #f0f0f0) !important;
    border-radius: 20px 20px 0 0 !important;
    min-height: auto !important;
    height: auto !important;
}

/* ---- Image Link ---- */
body .product-card__image a,
body.shop-page #productsGrid.products-grid .product-card__image > a,
body .related-products-grid .product-card__image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    background: none !important;
    opacity: 1 !important;
    position: static !important;
}

/* ---- Image ---- */
body .product-card__image img,
body.shop-page #productsGrid.products-grid .product-card__image img,
body .related-products-grid .product-card__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
    display: block !important;
    max-width: 100% !important;
}

body .product-card:hover .product-card__image img,
body.shop-page #productsGrid.products-grid .product-card:hover .product-card__image img,
body .related-products-grid .product-card:hover .product-card__image img {
    transform: scale(1.05) !important;
}

/* ---- Card Body ---- */
body .product-card__body,
body.shop-page #productsGrid.products-grid .product-card__body,
body .related-products-grid .product-card__body {
    padding: 18px 16px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    flex: 1 1 auto !important;
    background: #ffffff !important;
    text-align: left !important;
    overflow: visible !important;
    min-width: 0 !important;
}

/* ---- Brand ---- */
body .product-card__brand,
body.shop-page #productsGrid.products-grid .product-card__brand,
body .related-products-grid .product-card__brand {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    color: #D4AF37 !important;
    margin: 0 !important;
    display: block !important;
}

/* ---- Title ---- */
body .product-card__body h3,
body.shop-page #productsGrid.products-grid .product-card__body h3,
body .related-products-grid .product-card__body h3 {
    font-family: 'Playfair Display', serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    min-height: auto !important;
    min-width: 0 !important;
    display: block !important;
    overflow: visible !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
}

body .product-card__body h3 a,
body.shop-page #productsGrid.products-grid .product-card__body h3 a,
body .related-products-grid .product-card__body h3 a {
    display: inline !important;
    white-space: normal !important;
    overflow: visible !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* ---- Price ---- */
body .product-card__price,
body.shop-page #productsGrid.products-grid .product-card__price,
body .related-products-grid .product-card__price {
    margin: 4px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

body .product-card__price .price-current,
body.shop-page #productsGrid.products-grid .product-card__price .price-current,
body .related-products-grid .product-card__price .price-current {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
}

body .product-card__price .price-original {
    font-size: 0.85rem !important;
    color: #999 !important;
    text-decoration: line-through !important;
}

/* ---- Hide Old Unused Elements ---- */
body .product-card__actions,
body .product-card__overlay,
body .product-card__quick-view,
body .product-card__badges,
body .product-card__rating,
body .product-card__quick-add,
body .product-card__add-btn,
body .product-card__sizes,
body .product-card__colors,
body .product-card__meta,
body .shop-card-actions,
body .product-card__price-row {
    display: none !important;
}

/* ---- Responsive (exclude index New Arrivals grid — see index-product-cards.css) ---- */
@media (max-width: 1200px) {
    body:not(.index-page) .product-grid,
    body .products-grid:not(.womens-products__grid),
    body .related-products-grid,
    body.shop-page #productsGrid.products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    body:not(.index-page) .product-grid,
    body .products-grid:not(.womens-products__grid),
    body .related-products-grid,
    body.shop-page #productsGrid.products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    body.shop-page #productsGrid.products-grid.is-single-result {
        grid-template-columns: minmax(0, 1fr) !important;
        max-width: min(440px, 100%);
        margin-left: auto;
        margin-right: auto;
    }

    body .product-card,
    body.shop-page #productsGrid.products-grid > .product-card {
        border-radius: 16px !important;
    }

    body .product-card__body {
        padding: 14px 12px 16px !important;
    }

    body .product-card__body h3 {
        font-size: 0.9rem !important;
    }

    body .product-card__price .price-current {
        font-size: 1rem !important;
    }

    body .product-card__image {
        border-radius: 16px 16px 0 0 !important;
    }
}

@media (max-width: 480px) {
    body:not(.index-page) .product-grid,
    body .products-grid:not(.womens-products__grid),
    body .related-products-grid,
    body.shop-page #productsGrid.products-grid {
        gap: 12px !important;
    }

    body .product-card__image {
        aspect-ratio: 3/4 !important;
    }

    body .product-card__body {
        padding: 10px 10px 14px !important;
    }

    body .product-card__body h3 {
        font-size: 0.85rem !important;
    }

    body .product-card__brand {
        font-size: 0.6rem !important;
    }

    body .product-card__price .price-current {
        font-size: 0.9rem !important;
    }
}

/* Index luxury cards — keep premium UI visible */
body.index-page section.index-products .product-card--lux .product-card__price-row {
    display: flex !important;
}

body.index-page section.index-products .product-card--lux .product-card__quick {
    display: flex !important;
}

body.index-page section.index-products .product-card--lux .product-card__badge {
    display: inline-block !important;
}

body.index-page section.index-products .product-card--lux .product-card__overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.index-page section.index-products .product-card--lux .product-card__quick-view {
    display: none !important;
}

/* Women's page luxury cards — same as index (index-product-cards.css) */
body.womens-page section.womens-products .product-card--lux .product-card__price-row {
    display: block !important;
}

body.womens-page section.womens-products .product-card--lux .product-card__quick,
body.womens-page section.womens-products .product-card--lux .product-card__badge {
    display: none !important;
}

body.womens-page section.womens-products .product-card--lux .product-card__overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Index & women's luxury cards styled in index-product-cards.css */
