/* ==============================================
   AHMED PAPER DECORATIONS
   Product Card - FINAL Clean CSS
   ============================================== */

/* Card wrapper */
.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
    border: 1px solid var(--color-gray-100);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--color-gold);
}

/* Image */
.product-card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card-image-wrapper a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s ease;
}
.product-card:hover .product-card-image { transform: scale(1.05); }

/* Top-left badges (New / Sale / Hot) */
.product-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: 72px;
    pointer-events: none;
}
.product-card-badges .product-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Poppins', sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    white-space: nowrap;
    box-sizing: border-box;
}
.product-badge-new { background: #10B981; color: #fff; }
.product-badge-sale { background: #EF4444; color: #fff; }
.product-badge-trending { background: #F59E0B; color: #111; }

/* Top-right LOW STOCK pill (RED) */
.product-card-lowstock-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 7;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #EF4444;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.2;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    pointer-events: none;
    white-space: nowrap;
}
.product-card-lowstock-pill i {
    font-size: 8px;
}

/* Hover actions (top-right, shown on hover) */
.product-card-actions {
    position: absolute;
    top: 44px;              /* niche shift so low-stock pill dikhe */
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 7;
    opacity: 0;
    transform: translateX(15px);
    transition: all 0.3s ease;
}
.product-card:hover .product-card-actions {
    opacity: 1;
    transform: translateX(0);
}
.product-card-action-btn {
    width: 38px;
    height: 38px;
    background: #fff;
    border: none;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    text-decoration: none;
}
.product-card-action-btn:hover {
    background: #D4AF37;
    color: #000;
    transform: scale(1.1);
}
.product-card-action-btn.is-active {
    background: #EF4444;
    color: #fff;
}

/* Info section */
.product-card-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #FEF5E7;
}
.product-card-category {
    font-size: 10px;
    color: #B8941F;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 500;
}
.product-card-title {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.3;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    transition: color 0.2s ease;
}
.product-card-title:hover { color: #B8941F; }

/* Rating (clean) */
.product-card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.product-card-stars {
    display: flex;
    gap: 2px;
    color: #D4AF37;
    font-size: 11px;
}
.product-card-rating-count {
    font-size: 11px;
    color: #737373;
}

/* Price + Cart */
.product-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}
.product-card-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.product-card-price {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 700;
    color: #EF4444;
    line-height: 1;
}
.product-card-price-old {
    font-size: 12px;
    color: #A3A3A3;
    text-decoration: line-through;
    line-height: 1;
}
.product-card-cart-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, #D4AF37, #E5C158);
    border: none;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}
.product-card-cart-icon:hover {
    background: #000;
    color: #D4AF37;
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.product-card-cart-icon.is-disabled {
    background: #A3A3A3;
    color: #fff;
    cursor: not-allowed;
    box-shadow: none;
}
.product-card-cart-icon.is-disabled:hover {
    background: #A3A3A3;
    color: #fff;
    transform: none;
}

/* No image */
.product-card-no-image {
    width: 100%;
    height: 100%;
    background: #FAFAFA;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D4D4D4;
    font-size: 60px;
    min-height: 250px;
}
.product-card-no-image i { opacity: 0.5; }

/* Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Carousel (agar use ho) */
.product-carousel { position: relative; }
.product-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 15px;
}
.product-carousel-track::-webkit-scrollbar { display: none; }
.product-carousel-item {
    flex: 0 0 calc(25% - 15px);
    scroll-snap-align: start;
}

/* Out of stock ribbon */
.product-card.is-out-of-stock { position: relative; }
.product-out-of-stock-ribbon {
    position: absolute;
    top: 18px;
    right: -52px;
    width: 170px;
    background: linear-gradient(135deg, #DC2626, #991B1B);
    color: #FFFFFF;
    padding: 7px 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-align: center;
    transform: rotate(45deg);
    z-index: 5;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
    pointer-events: none;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1199px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .product-carousel-item { flex: 0 0 calc(33.333% - 11px); }
}

@media (max-width: 991px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .product-card-title { font-size: 14px; min-height: 38px; }
    .product-card-price { font-size: 16px; }
    .product-out-of-stock-ribbon {
        top: 15px; right: -50px; width: 160px; padding: 6px 0; font-size: 10px;
    }
}

@media (max-width: 767px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-carousel-item { flex: 0 0 calc(50% - 8px); }

    .product-card-actions { display: none !important; }

    .product-card-info { padding: 12px; }
    .product-card-category { font-size: 9px; margin-bottom: 4px; }
    .product-card-title { font-size: 13px; min-height: 34px; margin-bottom: 6px; }
    .product-card-rating { margin-bottom: 8px; }
    .product-card-price { font-size: 15px; }
    .product-card-price-old { font-size: 11px; }

    .product-card-cart-icon {
        width: 38px; height: 38px; min-width: 38px; font-size: 14px;
    }

    /* Top-left badges - small */
    .product-card-badges {
        top: 6px; left: 6px; gap: 3px; max-width: 62px;
    }
    .product-card-badges .product-badge {
        font-size: 8px; padding: 2px 5px;
    }

    /* Top-right low stock pill - small */
    .product-card-lowstock-pill {
        top: 6px; right: 6px;
        font-size: 8px;
        padding: 2px 6px;
    }
    .product-card-lowstock-pill i { font-size: 7px; }

    .product-out-of-stock-ribbon {
        top: 12px; right: -45px; width: 140px; padding: 5px 0; font-size: 9px; letter-spacing: 1px;
    }
}

@media (max-width: 575px) {
    .product-grid { gap: 10px; }
    .product-card-info { padding: 10px; }
    .product-card-title { font-size: 12px; min-height: 32px; }
    .product-card-price { font-size: 14px; }
    .product-card-price-old { font-size: 10px; }
    .product-card-cart-icon {
        width: 34px; height: 34px; min-width: 34px; font-size: 13px;
    }
    .product-card-category { font-size: 9px; }
    .product-card-stars { font-size: 10px; }
    .product-card-rating-count { font-size: 10px; }

    .product-card-badges { max-width: 58px; }
    .product-card-badges .product-badge { font-size: 7px; padding: 2px 4px; }

    .product-card-lowstock-pill {
        font-size: 7px; padding: 2px 5px;
    }

    .product-out-of-stock-ribbon {
        top: 10px; right: -42px; width: 130px; padding: 4px 0; font-size: 8.5px; letter-spacing: 0.8px;
    }
}

@media (max-width: 400px) {
    .product-card-info { padding: 8px; }
    .product-card-cart-icon {
        width: 32px; height: 32px; min-width: 32px; font-size: 12px;
    }
    .product-card-bottom { gap: 6px; }
    .product-card-badges { max-width: 54px; }
    .product-card-badges .product-badge { font-size: 7px; padding: 1px 4px; }
    .product-out-of-stock-ribbon {
        top: 9px; right: -40px; width: 125px; padding: 4px 0; font-size: 8px; letter-spacing: 0.5px;
    }
}

@media (max-width: 359px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}