.carousel-img {
    display: none;
}
.carousel-img.active {
    display: block;
}
/* Carousel Styles */
.product-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}
.carousel-images {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    position: absolute;
    left: 0;
    top: 0;
    transition: opacity 0.3s;
    background: #fff;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.15);
    border: none;
    color: #333;
    font-size: 1.2rem;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 2;
    border-radius: 50%;
    transition: background 0.2s;
}
.carousel-btn:hover {
    background: rgba(102,126,234,0.3);
}
.prev-btn {
    left: 8px;
}
.next-btn {
    right: 8px;
}
.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.carousel-indicator {
    width: 10px;
    height: 10px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
}
.carousel-indicator.active {
    background: #667eea;
}
@media (max-width: 768px) {
    .product-carousel, .carousel-img {
        height: 120px;
    }
}

 .btn-primary{
    margin-top: 15px;
     background: white;
    color: #667eea;
 }

 .btn-primary:hover{
     transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
 }

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 0px 69px 69px 69px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive Styles for Product Cards */
@media (max-width: 768px) {
    /* Grid container for 2 columns */
    .products-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        padding: 10px;
    }
    
    /* Product card main container */
    .product-card {
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        background: white;
        display: flex;
        flex-direction: column;
        height: fit-content;
        max-height: 380px; /* Maximum height control */
    }
    
    /* Product image container */
    .product-image {
        height: 120px; /* Reduced height */
        width: 100%;
        overflow: hidden;
        position: relative;
    }
    
    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    /* Featured badge */
    .product-badge {
        position: absolute;
        top: 5px;
        right: 5px;
        background:#28a745;
        color: white;
        padding: 2px 6px;
        font-size: 0.7rem;
        border-radius: 4px;
        font-weight: 600;
    }
    
    /* Product info container */
    .product-info {
        padding: 8px 10px 10px 10px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;
    }
    
    /* Category */
    .product-category {
        font-size: 0.7rem;
        color: #666;
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    
    /* Product name */
    .product-name {
        font-size: 0.9rem !important;
        font-weight: 600;
        color: #333;
        line-height: 1.2;
        margin: 0;
        display: -webkit-box;
        /* -webkit-line-clamp: 2; Max 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Price */
    .product-price {
        font-size: 1rem !important;
        font-weight: 700;
        color: #27ae60;
        margin: 2px 0;
    }
    
    /* Description */
    .product-description {
        font-size: 0.75rem;
        color: #666;
        line-height: 1.3;
        margin: 0;
        display: -webkit-box;
        /* -webkit-line-clamp: 2;  */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Specifications button */
    .product-specs {
        margin: 4px 0 2px 0;
    }
    
    .product-specs .btn-small {
        padding: 4px 8px;
        font-size: 0.7rem;
        border-radius: 4px;
        width: 100%;
    }
    
    .product-specs .btn-secondary {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        color: #495057;
    }
    
    /* Action buttons */
    .product-actions {
        margin-top: auto; /* Push to bottom */
        padding-top: 6px;
    }
    
    .product-actions .btn-small {
        padding: 6px 10px;
        font-size: 0.75rem;
        width: 100%;
        border-radius: 5px;
        font-weight: 600;
        margin-top: 0px;
        margin-bottom: 11px;
    }
    
    .product-actions .btn-primary {
        background: #667eea;
        color: white;
        border: none;
    }
    
    /* Icon sizing in buttons */
    .btn-small i {
        font-size: 0.7rem;
        margin-right: 4px;
    }
}

/* Extra small devices (very small phones) */
@media (max-width: 480px) {
    .products-grid {
        gap: 14px;
        padding: 8px;
    }
    
    .product-card {
        max-height: 360px;
    }
    
    .product-image {
        height: 100px; /* Even smaller for very small screens */
    }
    
    .product-info {
        padding: 6px 8px 8px 8px;
        gap: 3px;
    }
    
    .product-name {
        font-size: 0.85rem !important;
    }
    
    .product-price {
        font-size: 0.9rem !important;
    }
    
    .product-actions .btn-small,
    .product-specs .btn-small {
        font-size: 0.7rem;
        padding: 5px 8px;
        margin-top: -16px;
        margin-bottom: 11px;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .product-card {
        max-height: 320px;
    }
    
    .product-image {
        height: 100px;
    }
}
