/* Hero Section */
.hero {
    margin-top: 80px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    position: relative;
    background: #f1f5f1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    padding: 4rem 2rem 4rem 5rem;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: #7DA27E;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #2c3e50;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: #50575e;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    height: 80vh;
    position: relative;
}

.image-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Trust Section */
.trust-section {
    background: #ffffff;
    padding: 4rem 2rem;
    border-bottom: 1px solid #eaeaea;
}

.trust-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.trust-item {
    text-align: center;
    color: #fff;
    padding: 1rem;
    animation: fadeInUp 0.8s ease both;
}

.trust-item:nth-child(1) { animation-delay: 0.1s; }
.trust-item:nth-child(2) { animation-delay: 0.2s; }
.trust-item:nth-child(3) { animation-delay: 0.3s; }
.trust-item:nth-child(4) { animation-delay: 0.4s; }

.trust-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.trust-item h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.trust-item p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

/* Categories */
.categories, .featured {
    max-width: 1400px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.categories .section-title,
.categories .section-subtitle {
    display: inline-block;
    margin-bottom: 3rem;
}

.categories .section-title {
    margin-right: 1rem;
    margin-bottom: 0;
}

.categories .section-title::after {
    display: none;
}

.categories .section-subtitle {
    margin-bottom: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-arrow {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #6B8E23;
    opacity: 0;
    transition: all 0.3s ease;
}

.category-card:hover .category-arrow {
    opacity: 1;
    transform: translateY(-50%) translateX(5px);
}

/* Products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.product-card .promo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    z-index: 10;
    border-radius: 4px;
    font-size: 0.8rem;
}

.product-image {
    width: 100%;
    height: 260px;            /* slightly taller to better showcase instruments */
    max-height: 320px;        /* cap height for very tall viewports */
    overflow: hidden;
    cursor: pointer;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.product-category {
    font-size: 0.85rem;
    color: #7DA27E;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1rem 0;
    color: #2c3e50;
}

.product-price.has-promo {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.promo-price {
    color: #e74c3c;
}

.original-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 1rem;
    font-weight: normal;
}

.product-info .details-btn {
    display: block;
    width: 100%;
    margin-top: 1rem;
    text-align: center;
}

/* Shop Page */
.shop-container {
    max-width: 1400px;
    margin: 80px auto 2rem;
    padding: 0 2rem;
    display: flex;
    gap: 2rem;
}

.filters {
    width: 280px;
    background: #fff;
    border: 2px solid #d4f1d4;
    border-radius: 20px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 80px;
    box-shadow: 0 4px 12px rgba(139, 195, 139, 0.2);
}

.filters h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #3d6e3d;
}

.filter-group label {
    display: block;
    margin-bottom: 0.75rem;
    cursor: pointer;
    color: #5f8e5f;
}

.price-range {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.price-range input {
    width: 100px;
    padding: 0.5rem;
    border: 2px solid #d4f1d4;
    border-radius: 15px;
}

.shop-main {
    flex: 1;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.shop-header h1 {
    font-size: 2rem;
}

#sort-select {
    padding: 0.5rem 1rem;
    border: 2px solid #d4f1d4;
    border-radius: 15px;
    background: #fff;
    font-family: inherit;
}

/* Product Detail Page */
.product-detail-container {
    max-width: 1200px;
    margin: 120px auto 4rem;
    padding: 0 2rem;
}

/* Layout: gallery left, info right with controlled widths for consistent proportions */
.product-detail-content {
    display: flex;
    gap: 3rem;
    background: #fff;
    padding: 0;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Make gallery visually dominant but leave enough space for info */
.product-detail-gallery {
    flex: 0 0 52%;
    max-width: 52%;
    box-sizing: border-box;
}

/* Main image: keep aspect ratio, allow it to scale down on smaller screens */
.main-product-image {
    width: 100%;
    height: auto;
    max-height: 720px; /* allow large detailed view on desktop */
    max-width: 100%;
    object-fit: contain; /* preserve full image, centered */
    background: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* Ensure thumbnails and modal images use consistent sizing and cover where appropriate */
.product-thumbnails img,
.thumbnail {
    object-fit: cover;
}

/* Slightly larger thumbnails on wider screens but constrained */
.product-thumbnails img {
    width: 96px;
    height: 72px;
}

.thumbnail {
    width: 72px;
    height: 56px;
}

/* Modal main image constraints for consistent preview */
#modal-main-image {
    width: 100%;
    height: 420px;
    max-height: 60vh;
    object-fit: contain;
    border: 2px solid #d4f1d4;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* Promo product card images */
.promo-product-card img {
    width: 100%;
    height: 180px;
    max-height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* Admin and preview thumbnails */
.preview-image img,
.admin-product-item img,
.cart-item img,
.delivery-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive adjustments */
@media (max-width: 980px) {
    .product-image { height: 220px; max-height: 280px; }
    .product-thumbnails img { width: 84px; height: 64px; }
    .thumbnail { width: 64px; height: 48px; }
    #modal-main-image { height: 360px; }
}

@media (max-width: 480px) {
    .product-image { height: 200px; max-height: 240px; }
    .product-thumbnails img { width: 72px; height: 56px; }
    .thumbnail { width: 64px; height: 48px; }
    #modal-main-image { height: 300px; }
}

/* Thumbnails: wrap and stay compact; thumbnails show a clear active state */
.product-thumbnails {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.product-thumbnails img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.85;
    transition: transform 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.product-thumbnails img.active,
.product-thumbnails img:hover {
    opacity: 1;
    transform: translateY(-4px);
    border-color: #7bc87b;
    box-shadow: 0 8px 22px rgba(39, 174, 96, 0.06);
}

/* Product info column: slightly narrower to balance the gallery */
.product-detail-info {
    flex: 0 0 40%;
    max-width: 40%;
    box-sizing: border-box;
    min-width: 260px;
}

/* Typography and spacing preserved but slightly tuned for readability */
.product-detail-title {
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #556B2F;
}

.product-detail-category {
    color: #6B8E23;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    margin: 1rem 0;
    color: #556B2F;
}

/* Description card keeps width within column */
.product-detail-description {
    margin: 1.5rem 0;
    line-height: 1.8;
    font-size: 0.98rem;
    color: #50575e;
    padding: 1.25rem;
    background: #fff;
    border-radius: 12px;
    border-left: 4px solid #6B8E23;
}

/* Quantity and actions spacing tuned */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.quantity-selector button {
    width: 36px;
    height: 36px;
    border: 2px solid #d4f1d4;
    background: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: 10px;
}

.quantity-selector input {
    width: 64px;
    padding: 0.45rem;
    border: 2px solid #d4f1d4;
    border-radius: 10px;
    text-align: center;
}

/* Actions: keep clear CTA sizes */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.add-to-cart-large {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #6B8E23, #556B2F);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 18px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(86, 142, 47, 0.15);
}

.back-to-shop {
    padding: 0.6rem 1rem;
    background: #fff;
    color: #556B2F;
    border: 2px solid #6B8E23;
    border-radius: 18px;
}

/* Modal/main preview thumbnails */
#modal-main-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border: 2px solid #d4f1d4;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.thumbnail-gallery {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border: 2px solid #d4f1d4;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s, border-color 0.2s;
}

.thumbnail.active,
.thumbnail:hover {
    opacity: 1;
    border-color: #7bc87b;
}

/* Responsive adjustments: stack columns on small viewports and scale images */
@media (max-width: 980px) {
    .product-detail-gallery,
    .product-detail-info {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .product-detail-content {
        gap: 1.25rem;
    }
    .product-detail-title { font-size: 1.6rem; }
    .product-detail-price { font-size: 1.6rem; }
    .product-thumbnails img { width: 84px; height: 64px; }
    .thumbnail { width: 64px; height: 48px; }
}

@media (max-width: 480px) {
    .product-detail-container { margin-top: 100px; padding: 0 1rem; }
    .product-thumbnails img { width: 72px; height: 56px; }
    .product-detail-title { font-size: 1.3rem; }
    .product-detail-description { padding: 1rem; }
}

/* Related Products Scroller */
.related-products-section {
    margin-top: 4rem;
    border-top: 1px solid #eaeaea;
    padding-top: 2rem;
}

.related-products-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.related-products-scroller {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.related-products-scroller::-webkit-scrollbar {
    height: 8px;
}

.related-products-scroller::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.related-products-scroller::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.related-products-scroller .product-card {
    min-width: 250px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        margin-top: 120px;
    }

    .hero-content {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-visual {
        height: 300px;
        width: 100%;
    }

    .shop-container {
        flex-direction: column;
        margin-top: 120px;
        padding: 0 1rem;
    }

    .filters {
        width: 100%;
        position: static;
        margin-bottom: 2rem;
    }

    .modal-body,
    .product-detail-content {
        flex-direction: column;
        gap: 2rem;
    }

    .product-detail-container {
        margin-top: 140px;
        padding: 0 1rem;
    }
    
    .product-detail-title {
        font-size: 1.5rem;
    }
    
    .product-detail-price {
        font-size: 1.8rem;
    }
}