﻿/* ============================================
   ENHANCED PRODUCT DETAIL PAGE - OPTIMIZED
   ============================================ */

:root {
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f5f7fa;
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.6;
    color: #1f2937;
}

/* ============================================
   CONTAINER & LAYOUT OPTIMIZATION
   ============================================ */
.container-fluid {
    padding: clamp(0rem, 2vw, 2.5rem) clamp(0rem, 2.5vw, 2.5rem);
}

.shadow-xl-custom {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 5px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: var(--border-radius-lg);
}

/* ============================================
   IMAGE GALLERY - AUTO SLIDER WITH CONTROLS
   ============================================ */
.image-gallery-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

.image-main {
    width: 100%;
    height: clamp(280px, 45vw, 550px);
    object-fit: contain;
    border-radius: var(--border-radius-md);
    transition: opacity 0.4s ease-in-out, transform 0.3s ease;
    background: #f9fafb;
}

    .image-main:hover {
        transform: scale(1.02);
    }

/* Slider Navigation Buttons */
.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 clamp(0.25rem, 1vw, 0.75rem);
    pointer-events: none;
    z-index: 10;
}

.slider-btn {
    pointer-events: all;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    border: none;
    border-radius: 50%;
    width: clamp(32px, 6vw, 44px);
    height: clamp(32px, 6vw, 44px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: clamp(0.875rem, 2.5vw, 1.25rem);
}

    .slider-btn:hover {
        background: #3b82f6;
        color: white;
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

    .slider-btn:active {
        transform: scale(0.95);
    }

/* Slider Indicators */
.slider-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.375rem, 1vw, 0.5rem);
    margin-top: clamp(0.5rem, 1.5vw, 0.75rem);
    padding: clamp(0.25rem, 1vw, 0.5rem) 0;
}

.indicator-dot {
    width: clamp(6px, 1.5vw, 10px);
    height: clamp(6px, 1.5vw, 10px);
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
}

    .indicator-dot.active {
        background: #3b82f6;
        transform: scale(1.3);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }

    .indicator-dot:hover:not(.active) {
        background: #93c5fd;
        transform: scale(1.15);
    }

/* Thumbnail Container - Optimized Scroll */
.thumbnail-container {
    display: flex;
    gap: clamp(0.375rem, 1vw, 0.5rem);
    overflow-x: auto;
    overflow-y: hidden;
    padding: clamp(0.375rem, 1vw, 0.5rem) 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
    margin-left: clamp(0.25rem, 1vw, 0.5rem);
}

    .thumbnail-container::-webkit-scrollbar {
        height: 5px;
    }

    .thumbnail-container::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 10px;
    }

    .thumbnail-container::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
        transition: background 0.3s ease;
    }

        .thumbnail-container::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

.product-thumbnail {
    flex: 0 0 clamp(55px, 12vw, 90px);
    width: clamp(55px, 12vw, 90px);
    height: clamp(55px, 12vw, 90px);
    object-fit: cover;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    background: #f9fafb;
}

    .product-thumbnail:hover,
    .product-thumbnail.active {
        border-color: #3b82f6;
        transform: scale(1.08);
        box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    }

/* ============================================
   TABS SECTION - ORIGINAL STYLES PRESERVED
   ============================================ */
.product-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #ddd;
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-xs);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-button {
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.75rem, 3vw, 1.25rem);
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(var(--font-sm), 2vw, var(--font-base));
    background-color: #f9f9f9;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

    .tab-button.active {
        background-color: white;
        border: 1px solid #ccc;
        border-bottom: 3px solid #3b82f6;
        color: #3b82f6;
        font-weight: 700;
    }

    .tab-button:hover:not(.active) {
        background-color: #f0f9ff;
        color: #3b82f6;
    }

.tab-content {
    display: none;
    padding: clamp(0.5rem, 1vw, 1rem);
    background-color: white;
}

    .tab-content.active {
        display: block;
    }

/* ============================================
   HORIZONTALLY SCROLLABLE GRIDS - ORIGINAL
   ============================================ */
.scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: var(--spacing-md) 0;
}

    .scroll-container::-webkit-scrollbar {
        height: 8px;
    }

    .scroll-container::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 10px;
    }

    .scroll-container::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }

        .scroll-container::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

/* ============================================
   SIMILAR PRODUCTS SECTION WITH NAVIGATION BUTTONS
   ============================================ */
.similar-products-wrapper {
    position: relative;
    padding: 0 clamp(2.5rem, 5vw, 3.5rem);
}

/* Remove padding on mobile for full width */
@media (max-width: 767px) {
    .similar-products-wrapper {
        padding: 0 0rem;
    }
}

.similar-products-container {
    overflow: hidden;
    position: relative;
}

.similar-products-scroll {
    display: flex;
    gap: clamp(0.5rem, 1vw, 1rem);
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: clamp(0.75rem, 1vw, 1rem) 0;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scroll-snap-type: x mandatory; /* Snap scrolling for better UX */
}
    .similar-products-scroll::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome, Safari and Opera */
    }

/* Product cards sizing */
.similar-product-item {
    flex: 0 0 clamp(180px, 45vw, 200px);
    min-width: clamp(180px, 45vw, 200px);
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

    .similar-product-item img {
        height: 120px;
        aspect-ratio: 1;
        object-fit: fill;
    }

    .similar-product-item cat{
        visibility: visible;
    }
    /* Mobile optimization - show 2.3 cards to indicate more content */
    @media (max-width: 767px) {
        .similar-products-scroll {
            gap: 0.25rem;
            padding: 0.5rem 0;
            /* Add padding to the right to show partial card */
            padding-right: 1.5rem;
        }

        .similar-product-item {
            /* Calculate width to show ~2.3 cards */
            flex: 0 0 calc((100vw - 4rem) / 2.3);
            min-width: calc((100vw - 4rem) / 2.3);
        }
            .similar-product-item cat {
                visibility: hidden;
            }
    }

/* Tablet optimization - show 2.5 cards */
@media (min-width: 768px) and (max-width: 1024px) {
    .similar-product-item {
        flex: 0 0 calc((100% - 5rem) / 5.8);
        min-width: calc((100% - 5rem) / 4.6);
    }
}

/* Navigation Buttons for Similar Products */
.similar-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    border: none;
    border-radius: 50%;
    width: clamp(40px, 7vw, 52px);
    height: clamp(40px, 7vw, 52px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
}

    .similar-nav-btn:hover:not(:disabled) {
        background: #3b82f6;
        color: white;
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    }

    .similar-nav-btn:active {
        transform: translateY(-50%) scale(0.95);
    }

    .similar-nav-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        background: rgba(255, 255, 255, 0.6);
    }

.similar-nav-prev {
    left: 0;
}

.similar-nav-next {
    right: 0;
}

/* Hide navigation buttons on mobile and tablet */
@media (max-width: 1024px) {
    .similar-nav-btn {
        display: none !important;
    }

    /* Adjust wrapper padding since buttons are hidden */
    .similar-products-wrapper {
        padding: 0 0rem;
    }
}

/* Visual indicator for scrollable content on mobile */
@media (max-width: 767px) {
    .similar-products-scroll::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 3rem;
        background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
        pointer-events: none;
        z-index: 1;
    }

    /* Hide gradient when scrolled to end */
    .similar-products-scroll.scrolled-end::after {
        opacity: 0;
    }
}

/* Product card improvements for mobile */
@media (max-width: 768px) {
    .similar-product-item .bg-white {
        padding: 0.75rem;
    }

    .similar-product-item img {
        height: 90px;
        aspect-ratio: 1;
        object-fit: fill;
    }

    .similar-product-item h3 {
        font-size: 0.65rem;
        line-height: 1.3;
        margin-bottom: 0.25rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .similar-product-item p {
        font-size: 0.95rem;
        
        line-height:1rem;
    }

    .similar-product-item .text-xl,
    .similar-product-item .text-2xl {
        font-size: 1rem !important;
        font-weight: 700;
    }
}

/* Smooth scroll behavior */
.similar-products-scroll {
    scroll-padding: 0.75rem;
}

/* Touch interaction feedback */
@media (max-width: 1024px) {
    .similar-product-item {
        transition: transform 0.2s ease;
    }

        .similar-product-item:active {
            transform: scale(0.98);
        }
}

/* Ensure product cards maintain aspect ratio */
.similar-product-item .bg-white {
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .similar-product-item .bg-white > div:first-child {
        flex-shrink: 0;
    }

    .similar-product-item .bg-white > div:last-child {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

/* Features Grid - Horizontal Scroll */
.features-grid {
    display: grid;
    min-width: min-content;
}

.feature-item {
    flex: 0 0 clamp(280px, 45vw, 400px);
    display: flex;
    align-items: center;
    background-color: #ffffff;
    padding: var(--spacing-md);
    transition: all 0.3s ease;
}

    

.feature-icon {
    width: clamp(30px, 10vw, 50px);
    height: clamp(30px, 10vw, 50px);
    flex-shrink: 0;
    margin-right: var(--spacing-md);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f9ff;
}

    .feature-icon img {
        width: 100%;
        height: 100%;
        object-fit: fill;
    }

.feature-item p {
    margin: 0;
    font-size: clamp(var(--font-xs), 2vw, var(--font-base));
    line-height: 1.4;
    color: #1f2937;
    font-weight: 500;
}

/* Applications Grid - Horizontal Scroll */
.applications-grid {
    display: grid;
    min-width: min-content;
}

.application-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #ffffff;
    transition: all 0.3s ease;
    padding: var(--spacing-md);
}

    .application-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

.application-icon {
    width: clamp(70px, 12vw, 120px);
    height: clamp(50px, 12vw, 80px);
    margin-bottom: var(--spacing-sm);
    border-radius: 12px;
    border: 1px solid black;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f9ff;
}

    .application-icon img {
        width: 100%;
        height: 100%;
        object-fit: fill;
    }

.application-item p {
    margin: 0;
    font-size: clamp(var(--font-xs), 1.8vw, var(--font-sm));
    line-height: 1.4;
    color: #1f2937;
    font-weight: 500;
}

/* Safety Grid - Horizontal Scroll */
.safety-grid {
    display: grid;
    min-width: min-content;
}

.safety-item {
    flex: 0 0 clamp(280px, 45vw, 400px);
    display: flex;
    align-items: center;
    background-color: #ffffff;
    padding: var(--spacing-md);
    transition: all 0.3s ease;
}



.safety-icon {
    width: clamp(30px, 10vw, 50px);
    height: clamp(30px, 10vw, 50px);
    flex-shrink: 0;
    margin-right: var(--spacing-md);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f9ff;
}

    .safety-icon img {
        width: 100%;
        height: 100%;
        object-fit: fill;
    }

.safety-item p {
    margin: 0;
    font-size: clamp(var(--font-xs), 2vw, var(--font-base));
    line-height: 1.4;
    color: #1f2937;
    font-weight: 500;
}

/* ============================================
   HEADINGS & SEPARATORS
   ============================================ */
.heading-underline {
    height: 3px;
    width: clamp(100px, 25vw, 160px);
    margin: clamp(0.5rem, 1.5vw, 0.75rem) auto;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}


/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 1024px) {
    .feature-item,
    .application-item,
    .safety-item {
        flex: 0 0 clamp(220px, 40vw, 300px);
    }
}

@media (max-width: 768px) {
    .feature-item,
    .application-item,
    .safety-item {
        flex: 0 0 clamp(180px, 60vw, 250px);
    }

    .scroll-container {
        overflow: visible;
    }

    .features-grid,
    .applications-grid,
    .safety-grid {
        flex-wrap: wrap;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 2px;
}

button:focus-visible,
.tab-button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
.image-main,
.product-thumbnail,
.feature-icon img,
.application-icon img,
.safety-icon img {
    will-change: transform;
}

.scroll-container,
.thumbnail-container,
.similar-products-scroll {
    will-change: scroll-position;
}

/* Smooth scroll snap for better UX */
.scroll-container {
    scroll-snap-type: x mandatory;
}

.feature-item,
.application-item,
.safety-item,
.video-container,
.similar-product-item {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* ============================================
   OFFERS SECTION OPTIMIZATION
   ============================================ */
#offers-content {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 0;
}

#offers-header {
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

    #offers-header:hover {
        background: linear-gradient(90deg, #fbbf24, #f59e0b);
    }

#offers-arrow {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.offer-card {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   DELIVERY & ENQUIRY SECTIONS
   ============================================ */
.delivery {
    gap: clamp(0.5rem, 2vw, 1rem);
}

    .delivery > div {
        padding: clamp(0.625rem, 2vw, 0.875rem);
        border-radius: var(--border-radius-sm);
        font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    }

    .delivery span {
        font-size: clamp(0.75rem, 1.8vw, 0.875rem);
        line-height: 1.4;
    }

.enquiry {
    padding: clamp(0.625rem, 2vw, 0.875rem);
    font-size: clamp(0.8125rem, 1.9vw, 0.9375rem);
    border-radius: var(--border-radius-sm);
}

    .enquiry p {
        margin: 0;
        line-height: 1.5;
    }

/* ============================================
   QUANTITY CONTROLS
   ============================================ */
#quantity {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 600;
}

#decrease-quantity,
#increase-quantity {
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    font-size: clamp(0.875rem, 2vw, 1rem);
}

/* ============================================
   REVIEWS SECTION
   ============================================ */
.star-rating-input i {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    transition: all 0.2s ease;
}

    .star-rating-input i:hover {
        transform: scale(1.15);
    }

    .star-rating-input i.selected {
        transform: scale(1.1);
    }

/* ============================================
   LOADING STATES
   ============================================ */
.loading-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}



/* ============================================
   NOTIFICATION MODAL
   ============================================ */
#notify-modal {
    z-index: 10000;
}

    #notify-modal > div {
        animation: modalSlideIn 0.3s ease-out;
        margin: auto;
        margin-top: 10vh;
    }

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   PINCODE CHECK SECTION
   ============================================ */
#pincode-input,
#alternative-pincode-input {
    font-size: clamp(0.8125rem, 1.8vw, 0.9375rem);
    padding: clamp(0.5rem, 1.5vw, 0.625rem);
}

#check-pincode-button,
#check-alternative-pincode-button {
    font-size: clamp(0.8125rem, 1.8vw, 0.9375rem);
    white-space: nowrap;
}

#delivery-status,
#user-delivery-status,
#alternative-delivery-status {
    font-size: clamp(0.75rem, 1.7vw, 0.875rem);
}

/* ============================================
   CUSTOMER REVIEWS CARDS
   ============================================ */
.similar-products + div > div:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.875rem, 2.5vw, 1.25rem);
    justify-content: center;
}

    .similar-products + div > div:first-child > div {
        flex: 1 1 clamp(260px, 45%, 400px);
        max-width: 500px;
    }

@media (max-width: 768px) {
    .similar-products + div > div:first-child > div {
        flex: 1 1 100%;
    }
}

/* ============================================
   ANIMATIONS FOR INTERACTIVITY
   ============================================ */
.feature-item,
.application-item,
.safety-item {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

    .feature-item:nth-child(1),
    .application-item:nth-child(1),
    .safety-item:nth-child(1) {
        animation-delay: 0.05s;
    }

    .feature-item:nth-child(2),
    .application-item:nth-child(2),
    .safety-item:nth-child(2) {
        animation-delay: 0.1s;
    }

    .feature-item:nth-child(3),
    .application-item:nth-child(3),
    .safety-item:nth-child(3) {
        animation-delay: 0.15s;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FINAL POLISH
   ============================================ */
/* Ensure all images load smoothly */
img {
    display: block;
    max-width: 100%;
}

/* Smooth transitions for all interactive elements */
a,
button,
input,
select,
textarea {
    transition: all var(--transition-speed) ease;
}

/* Remove default outline and add custom focus */
:focus {
    outline: none;
}

/* Better text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Prevent text selection on buttons */
button,
.slider-btn,
.tab-button,
.similar-nav-btn {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ============================================
   WISHLIST AND CART BUTTON STYLES
   ============================================ */

/* Wishlist Button Styles */
.wishlist-btn {
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    border: none;
    outline: none;
}

    /* Default state - not in wishlist */
    .wishlist-btn.bg-gray-300 {
        background-color: #d1d5db;
        color: #374151;
    }

        /* Hover state when NOT in wishlist */
        .wishlist-btn.bg-gray-300:hover {
            background-color: #ec4899;
            color: white;
            transform: scale(1.05);
        }

    /* Active state - in wishlist */
    .wishlist-btn.bg-pink-500 {
        background-color: #ec4899;
        color: white;
    }

        /* Hover state when IN wishlist */
        .wishlist-btn.bg-pink-500:hover {
            background-color: #be185d;
            transform: scale(1.05);
        }

/* Cart Button Styles */
.cart-btn {
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    border: none;
    outline: none;
}

    /* Default state - not in cart */
    .cart-btn.bg-gray-300 {
        background-color: #d1d5db;
        color: #374151;
    }

        /* Hover state when NOT in cart */
        .cart-btn.bg-gray-300:hover {
            background-color: #ea580c;
            color: white;
            transform: scale(1.05);
        }

    /* Active state - in cart */
    .cart-btn.bg-orange-500 {
        background-color: #f97316;
        color: white;
    }

        /* Hover state when IN cart */
        .cart-btn.bg-orange-500:hover {
            background-color: #c2410c;
            transform: scale(1.05);
        }

    /* Button icon styles */
    .wishlist-btn i,
    .cart-btn i {
        transition: transform 0.2s ease-in-out;
    }

    .wishlist-btn:hover i,
    .cart-btn:hover i {
        transform: scale(1.1);
    }

    /* Active/Pressed state */
    .wishlist-btn:active,
    .cart-btn:active {
        transform: scale(0.95);
    }

    /* Focus state for accessibility */
    .wishlist-btn:focus,
    .cart-btn:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }

    /* Disabled state for out of stock */
    .cart-btn:disabled {
        cursor: not-allowed;
        opacity: 0.6;
        background-color: #9ca3af !important;
        color: #6b7280 !important;
    }

        .cart-btn:disabled:hover {
            transform: none;
            background-color: #9ca3af !important;
        }

    /* Loading state (optional - for when API call is in progress) */
    .wishlist-btn.loading,
    .cart-btn.loading {
        pointer-events: none;
        opacity: 0.7;
        position: relative;
    }

        .wishlist-btn.loading::after,
        .cart-btn.loading::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
        }

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .wishlist-btn,
    .cart-btn {
        padding: 0.625rem;
    }
}

/* Tooltip styles (optional enhancement) */
.wishlist-btn[data-tooltip],
.cart-btn[data-tooltip] {
    position: relative;
}

    .wishlist-btn[data-tooltip]::before,
    .cart-btn[data-tooltip]::before {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(-8px);
        background-color: #1f2937;
        color: white;
        padding: 0.375rem 0.75rem;
        border-radius: 0.375rem;
        font-size: 0.75rem;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
        z-index: 1000;
    }

    .wishlist-btn[data-tooltip]:hover::before,
    .cart-btn[data-tooltip]:hover::before {
        opacity: 1;
        transform: translateX(-50%) translateY(-4px);
    }

/* Animation for button state changes */
@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.wishlist-btn.pulse,
.cart-btn.pulse {
    animation: buttonPulse 0.4s ease-in-out;
}
