/* ========================================================
   FIRELAX - Modern Product Card (Visual Geometric Style)
   Implementation of the "Color Header & Angled Divider" design
   ======================================================== */

.product-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    border: 1px solid #f0f0f0;
    padding: 12px; /* Shared inner gutter so header/body/footer align */
}

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

/* =========================================
   1. Visual Header (Color Block & Image)
   ========================================= */
.card-visual-header {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0;
    /* Create the "cut" at the bottom right corner going up */
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
    padding: 0;
    padding-bottom: 22px;
}

.card-visual-header,
.card-content,
.card-actions-bottom {
    width: 100%;
}

/* Color cycling - Muted/Desaturated Colors */
.product-card:nth-child(3n+1) .card-visual-header {
    background: #d49090; /* Muted Red */
}
.product-card:nth-child(3n+2) .card-visual-header {
    background: #a291cc; /* Muted Purple */
}
.product-card:nth-child(3n+3) .card-visual-header {
    background: #8cb2d9; /* Muted Blue */
}

/* Image inside the header */

/* Image inside the header */
.product-image-link {
    display: block;
    width: 80%;
    height: 80%;
    position: relative;
    z-index: 2;
    background: transparent; /* No white box around image in this design? Image shows transparent background or photo */
    /* If photos have background, we might need a rounded container. 
       Assuming transparent BG product photos for best effect. 
       If not, we can add a subtle white glow or container.
    */
    border-radius: 12px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* or cover if lifestyle images */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15)); /* Shadow on the product itself */
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05) rotate(2deg);
}

/* =========================================
   2. Body & Content
   ========================================= */
.card-content {
    flex: 1;
    background: #ffffff;
    /* Aligned widths: Remove side padding from content wrapper */
    padding: 14px 4px 0 4px;
    display: flex;
    flex-direction: column;
    z-index: 10;
    margin-top: 0;
    position: relative;
    overflow: visible; /* For buttons sticking out if needed */
}

/* Stock Status */
.stock-status-line {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}
.stock-status-line .text-warning { color: #D97706 !important; }
.stock-status-line .text-success { color: #10B981 !important; }
.stock-status-line .text-danger { color: #EF4444 !important; }

/* Category Tag (Floating Pill) */
.category-tag-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.category-tag {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #4B5563;
    text-transform: uppercase;
    background: #fff;
    letter-spacing: 0.5px;
}

/* Favorite Heart */
.btn-favorite {
    background: none;
    border: none;
    color: #FBBF24; /* Yellow heart */
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    z-index: 50; /* Ensure clickability */
}
.btn-favorite:hover {
    transform: scale(1.2);
}

/* Title */
.product-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    line-height: 1.3;
    /* Limit lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em; /* Ensure fixed height approx 2 lines */
}

.product-title, .product-title a {
    color: #000000 !important; /* Force Black Title */
}

/* Rating */
.rating-stars {
    font-size: 0.8rem;
    margin-bottom: 10px;
}

/* =========================================
   3.5 Footer Area (Price & Qty)
   ========================================= */
.card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.product-price-block {
    min-width: 0;
}

.product-price-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #22C55E; /* Modern Green */
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

.original-price {
    font-size: 0.9rem;
    color: #EF4444; /* Red */
    text-decoration: line-through;
    margin-bottom: 2px;
    font-weight: 500;
}

.price-vat-hint {
    font-size: 0.7rem;
    color: #000 !important;
    margin-top: 2px;
}

.product-base-price-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #0369a1 !important;
    font-weight: 600;
    margin-top: 2px;
}

.product-base-price-hint i {
    font-size: 0.65rem;
}

/* =========================================
   4. Add to Cart & Wishlist Buttons
   ========================================= */
.card-actions-bottom {
    margin-top: auto;
    padding: 0 4px 4px 4px;
    display: flex;
    gap: 10px;
}

/* ========================================================
   List View support (Products/Index toggles .list-view on .product-grid)
   ======================================================== */
.product-grid.list-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.product-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: stretch;
    padding: 12px;
    gap: 14px;
}

.product-grid.list-view .card-visual-header {
    height: 100%;
    min-height: 180px;
    border-radius: 14px;
    clip-path: none;
    padding-bottom: 12px;
}

.product-grid.list-view .card-content {
    padding: 12px 8px 0 8px;
}

.product-grid.list-view .card-actions-bottom {
    padding: 0 0 12px 0;
}

@media (max-width: 768px) {
    .product-grid.list-view .product-card {
        grid-template-columns: 1fr;
    }

    .product-grid.list-view .card-visual-header {
        min-height: 180px;
    }
}

.btn-add-to-cart-block {
    flex-grow: 1;
    background: #FBBF24; /* Yellow */
    color: #1F2937;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 12px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(251, 191, 36, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.btn-add-to-cart-block:hover {
    background: #F59E0B;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(251, 191, 36, 0.4);
}

.btn-add-to-cart-block.disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-wishlist-block {
    width: 45px; /* Square-ish */
    background: #F3F4F6;
    color: #4B5563;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    position: relative;
    z-index: 50; /* Ensure clickability */
}

.btn-wishlist-block:hover {
    background: #E5E7EB;
    color: #111827;
    border-color: #D1D5DB;
}

/* =========================================
   Badge Styles (Top Right Red Frame)
   ========================================= */
.badge-overlay {
    position: absolute;
    top: 16px;
    z-index: 20;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    line-height: 1;
}

.badge-sale {
    right: 16px; /* Top Right */
    left: auto;
    background: #EF4444; /* Red Background */
    color: #ffffff; /* White Text */
    border: 1px solid #DC2626;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.badge-sold-out {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(17, 24, 39, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.2);
}

.badge-low-stock {
    left: 16px; /* Keep low stock on left or move? Left is fine */
    background: #FFFBEB;
    color: #D97706;
    border: 1px solid #FCD34D;
}

/* Qty Selector Style */
.qty-selector-mock {
    display: flex;
    align-items: center;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    height: 36px;
}

.qty-btn {
    width: 28px;
    height: 100%;
    border: none;
    background: #F9FAFB;
    color: #4B5563;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover { background: #E5E7EB; }

.qty-input {
    width: 32px;
    height: 100%;
    border: none;
    border-left: 1px solid #E5E7EB;
    border-right: 1px solid #E5E7EB;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    background: white;
}


