/* HOMEPAGE PRODUCT CARDS - CLEAN IMPLEMENTATION */

/* Use Product Page Card Styles for Homepage */
.product-showcase-section .product-page-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;
}

.product-showcase-section .product-page-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.product-showcase-section .product-page-card .product-image-container {
    position: relative;
}

.product-showcase-section .product-page-card .product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-showcase-section .product-details-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1rem;
    justify-content: center;
    text-align: center;
}

.product-showcase-section .product-main-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.product-showcase-section .product-page-card .product-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    text-align: center;
}

.product-showcase-section .product-page-card .product-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.product-showcase-section .product-page-card .product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0.5rem 0;
    text-align: center;
}

.product-showcase-section .product-page-card .product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #c2185b;
    margin: 0.5rem 0;
    text-align: center;
}

.product-showcase-section .product-page-card .product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: center;
}

.product-showcase-section .product-page-card .product-actions .btn {
    width: 140px;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-showcase-section .product-page-card .product-actions .btn-primary {
    background: linear-gradient(135deg, #c2185b, #e91e63);
    color: white;
    box-shadow: 0 4px 15px rgba(194, 24, 91, 0.3);
}

.product-showcase-section .product-page-card .product-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(194, 24, 91, 0.4);
    background: linear-gradient(135deg, #a91650, #c2185b);
}

.product-showcase-section .product-page-card .product-actions .btn-outline {
    background: transparent;
    color: #c2185b;
    border: 2px solid #c2185b;
    box-shadow: 0 2px 10px rgba(194, 24, 91, 0.1);
}

.product-showcase-section .product-page-card .product-actions .btn-outline:hover {
    background: #c2185b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(194, 24, 91, 0.3);
}

/* Desktop Layout - Always Show Buttons */
@media (min-width: 1200px) {
    .product-showcase-section .product-page-card {
        flex-direction: row;
        height: 240px;
    }
    .product-showcase-section .product-page-card .product-image-container {
        flex: 0 0 40%;
        height: 100%;
    }
    .product-showcase-section .product-page-card .product-details-wrapper {
        flex: 1 1 60%;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    .product-showcase-section .product-page-card .card-top-content {
        display: flex;
        flex-grow: 1;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        width: 100%;
    }
    .product-showcase-section .product-page-card .product-main-info {
        flex-grow: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .product-showcase-section .product-page-card .product-actions {
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        gap: 0.75rem;
        align-items: center;
    }
    .product-showcase-section .product-page-card .product-actions .btn {
        width: 120px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Mobile & Tablet: Carousel Layout */
@media (max-width: 1023px) {
    .product-grid-wrapper {
        overflow-x: auto;
        scroll-behavior: smooth;
    }

    .product-showcase-section .product-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 1.5rem;
        padding: 0 2rem 1rem 2rem;
    }
    
    .product-grid-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: auto;
        scroll-padding-left: 2rem;
    }
    
    .product-showcase-section .product-page-card:first-child {
        margin-left: 0.5rem;
    }

    .product-showcase-section .product-page-card {
        flex: 0 0 260px;
        width: 260px;
    }

    .carousel-btn.prev { left: 5px; }
    .carousel-btn.next { right: 5px; }
}

@media (max-width: 767px) {
    .product-showcase-section .product-page-card {
        flex: 0 0 240px;
        width: 240px;
    }
}

/* Quick View Button */
.product-showcase-section .quick-view-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    transform: translateY(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
}

.product-showcase-section .product-image-container:hover .quick-view-btn {
    transform: translateY(0);
    opacity: 1;
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: none;
    justify-content: center;
    align-items: center;
}

.carousel-btn:hover {
    background-color: #fff;
    transform: translateY(-50%) scale(1.08);
    color: #c2185b;
}

/* Quick View Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(25, 25, 30, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content.quick-view-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding: 0;
}

.modal-overlay.visible .modal-content.quick-view-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #c2185b;
}

#quick-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem;
    max-height: 90vh;
    overflow-y: auto;
}

.quick-view-image-container img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    border-radius: 8px;
}

.quick-view-details h2 { margin-top: 0; font-size: 2rem; color: #333; }
.quick-view-details .price { font-size: 1.8rem; font-weight: bold; color: #c2185b; margin: 0.5rem 0 1rem; }
.quick-view-details .description { font-size: 0.95rem; line-height: 1.6; color: #555; margin-bottom: 1.5rem; }
.quick-view-details .view-full-details-btn { display: inline-block; margin-top: 1.5rem; color: #c2185b; text-decoration: none; font-weight: 600; }

@media (max-width: 768px) {
    #quick-view-content {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
}
/* MOBILE SCROLL FIX AND DEAL BADGES */
@media (max-width: 1023px) {
    .carousel-container {
        position: relative;
        overflow: hidden;
    }
    
    .product-grid-wrapper {
        overflow-x: scroll;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .product-grid-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .product-showcase-section .product-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 1.5rem;
        padding-left: 1rem;
        padding-right: 1rem;
        width: max-content;
    }
    
    .product-showcase-section .product-page-card:first-child {
        margin-left: 1rem;
    }
    
    .product-showcase-section .product-page-card:last-child {
        margin-right: 1rem;
    }
}

/* DEAL BADGES */
.product-showcase-section .deal-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.product-showcase-section .deal-badge.promo {
    background: linear-gradient(135deg, #e91e63, #c2185b);
}

.product-showcase-section .deal-badge.student-discount {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.product-showcase-section .deal-badge i {
    font-size: 0.6rem;
}