/* style.css - White Theme & Mobile First */
:root {
    --bg-light: #ffffff;
    --bg-page: #f5f7fa;
    --primary: #ee4d2d; /* vibrant orange/red typical for ecommerce */
    --primary-glow: rgba(238, 77, 45, 0.2);
    --text-main: #222222;
    --text-muted: #757575;
    --border-subtle: #f0f0f0;
    --card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
}

/* Base Mobile Layout */
.app-container {
    max-width: 100%;
}

/* Navbar */
.navbar {
    background-color: var(--bg-light);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.logo span {
    color: var(--primary);
}

.navbar nav {
    display: none; /* Hide nav links on mobile for cleaner look */
}

.buy-now-btn {
    display: none; /* Hide top buy btn on mobile */
}

/* Gallery Section */
.gallery-section {
    background-color: var(--bg-light);
    margin-bottom: 0.5rem;
}

.main-display {
    width: 100%;
    aspect-ratio: 1/1; /* Square for mobile standard */
    background: #fff;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0; /* Add some softness for mobile */
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    position: relative;
}

.carousel-slide img, .carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Better than cover so product isn't cut off */
}

/* Nav Buttons for PC/Tablets, hidden on mobile by default */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0; /* Hidden unless hover */
}

@media (hover: hover) {
    .main-display:hover .carousel-nav {
        opacity: 1;
    }
    .carousel-nav:hover {
        background: #fff;
        transform: translateY(-50%) scale(1.1);
    }
}

.carousel-nav.prev { left: 10px; }
.carousel-nav.next { right: 10px; }

.carousel-nav i {
    font-size: 1.5rem;
    color: var(--text-main);
}

.thumbnails {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    scrollbar-width: none; /* Firefox */
}
.thumbnails::-webkit-scrollbar {
    display: none; /* Chrome */
}

.thumb {
    min-width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    background: var(--bg-page);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
}

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

.thumb.active {
    border-color: var(--primary);
}

.video-thumb i {
    font-size: 1.8rem;
    color: var(--primary);
}

.video-thumb span {
    font-size: 0.65rem;
    margin-top: 4px;
    font-weight: 600;
}

/* Info Section */
.product-info-section {
    padding: 1.25rem 1rem;
    background-color: var(--bg-light);
    margin-bottom: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(238, 77, 45, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    border: none;
}

.product-title {
    font-size: 1.2rem;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #000;
}

.product-title span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    margin-top: 0.25rem;
}

/* Owner Badge */
.owner-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(238, 77, 45, 0.08), rgba(238, 77, 45, 0.02));
    border: 1px dashed rgba(238, 77, 45, 0.3);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.owner-badge i {
    font-size: 2.2rem;
    color: var(--primary);
}

.owner-info {
    display: flex;
    flex-direction: column;
}

.owner-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.owner-info strong {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0 1rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1rem;
}

.price-amount {
    font-size: 2.2rem;
    color: #ff0000;
    font-weight: 900;
}

.price-status {
    background: rgba(238, 77, 45, 0.1);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.rating {
    display: flex;
    align-items: center;
    color: #ffc107;
    font-size: 0.9rem;
}

.rating span {
    color: var(--text-muted);
    margin-left: 0.3rem;
    font-size: 0.8rem;
}

/* Details Grid */
.details-grid {
    display: flex;
    flex-direction: column;
    margin: 1rem 0;
    background: var(--bg-light);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
    border-radius: 0;
    backdrop-filter: none;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item:hover {
    transform: none;
    background: transparent;
}

.detail-item i {
    font-size: 1.4rem;
    color: var(--text-muted);
    background: var(--bg-page);
    padding: 0.6rem;
    border-radius: 50%;
}

.detail-text {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-text strong {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: normal;
}

.detail-text p {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
}

/* Cards for description */
.description-card, .technology-card {
    background-color: var(--bg-light);
    padding: 1.25rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0;
    border: none;
    backdrop-filter: none;
    box-shadow: none;
}

.description-card h3, .technology-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.description-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.description-card strong {
    color: var(--text-main);
}

.technology-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.technology-card li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.technology-card li i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 2px;
    background: transparent;
    padding: 0;
}

.technology-card li strong {
    color: var(--text-main);
}

/* Action buttons inside content - hidden on mobile */
.action-buttons {
    display: none;
}

/* Sticky Bottom CTA */
.bottom-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-light);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    display: flex;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    z-index: 100;
    border-top: 1px solid var(--border-subtle);
}

.bottom-cta .contact-btn {
    flex: 1;
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.5rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.7rem;
    cursor: pointer;
}

.bottom-cta .contact-btn i {
    font-size: 1.5rem;
    color: var(--text-main);
}

.bottom-cta .add-cart-btn {
    flex: 3;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Desktop Styles */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
        background-color: #f7f9fc;
        font-size: 16px;
    }
    
    .app-container {
        max-width: 1100px;
        margin: 2.5rem auto;
        padding: 0 2rem;
    }

    .navbar {
        border-radius: 16px;
        margin-bottom: 2rem;
        box-shadow: 0 8px 30px rgba(0,0,0,0.04);
        padding: 1.25rem 2.5rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }

    .navbar nav {
        display: flex;
        gap: 2.5rem;
    }

    .navbar nav a {
        text-decoration: none;
        color: var(--text-main);
        font-weight: 500;
        font-size: 1rem;
        transition: color 0.3s ease;
    }
    
    .navbar nav a:hover {
        color: var(--primary);
    }

    .buy-now-btn {
        display: block;
        background: var(--primary);
        color: white;
        border: none;
        padding: 0.6rem 1.8rem;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .buy-now-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(238, 77, 45, 0.3);
    }

    .product-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: start;
        background: #fff;
        padding: 3.5rem;
        box-shadow: 0 10px 40px rgba(0,0,0,0.05);
        border-radius: 24px;
        margin-bottom: 3rem;
    }

    .gallery-section {
        background: transparent;
        position: sticky;
        top: 110px;
        margin-bottom: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .main-display {
        border-radius: 16px;
        aspect-ratio: 1/1;
        border: 1px solid var(--border-subtle);
        margin-bottom: 1.5rem;
        overflow: hidden;
    }

    .thumbnails {
        gap: 0.8rem;
        padding: 0.5rem 0;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .thumb {
        cursor: pointer;
        transition: transform 0.3s ease, border-color 0.3s ease;
        border-radius: 12px;
        min-width: 65px;
        height: 65px;
    }

    .thumb:hover {
        transform: translateY(-3px);
    }
    
    .product-info-section, .description-card, .technology-card {
        background: transparent;
        padding: 0;
        margin-bottom: 0;
        border-radius: 0;
        box-shadow: none;
        transition: none;
        border: none;
    }
    
    .description-card, .technology-card {
        margin-top: 2.5rem;
        padding-top: 2.5rem;
        border-top: 1px solid var(--border-subtle);
    }

    .description-card:hover, .technology-card:hover {
        transform: none;
        box-shadow: none;
    }

    .product-title {
        font-size: 2.2rem;
        font-weight: 800;
        line-height: 1.35;
        margin-bottom: 1.5rem;
        color: var(--text-main);
    }
    
    .product-title span {
        font-size: 1.1rem;
        margin-top: 0.6rem;
    }

    .badge {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
        margin-bottom: 1rem;
    }
    
    .owner-badge {
        background: linear-gradient(135deg, rgba(238, 77, 45, 0.05), rgba(238, 77, 45, 0.1));
        border: 1px dashed rgba(238, 77, 45, 0.3);
        border-radius: 16px;
        padding: 1.5rem 2rem;
        transform: scale(1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        margin-top: 1.5rem;
        margin-bottom: 2rem;
    }

    .owner-badge:hover {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(238, 77, 45, 0.08);
    }
    
    .price-amount {
        font-size: 2.8rem;
    }

    .details-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        background: transparent;
        margin-top: 2rem;
    }
    
    .detail-item {
        border: 1px solid var(--border-subtle);
        border-radius: 16px;
        padding: 1.25rem 1.5rem;
        background: #fdfdfd;
        transition: all 0.3s ease;
    }
    
    .detail-item:hover {
        border-color: var(--primary);
        box-shadow: 0 8px 25px rgba(238, 77, 45, 0.08);
        transform: translateY(-4px);
        background: #fff;
    }
    
    .detail-text {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-text p {
        margin-top: 0.4rem;
        font-size: 1rem;
    }
    
    .action-buttons {
        display: flex;
        gap: 1.5rem;
        margin-top: 2.5rem;
    }
    
    .action-buttons .add-cart-btn {
        flex: 2;
        background: var(--primary);
        color: white;
        border: none;
        padding: 1.2rem;
        border-radius: 12px;
        font-weight: bold;
        font-size: 1.1rem;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .action-buttons .add-cart-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(238, 77, 45, 0.3);
    }
    
    .action-buttons .contact-btn {
        flex: 1;
        background: white;
        color: var(--text-main);
        border: 2px solid var(--border-subtle);
        padding: 1.2rem;
        border-radius: 12px;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.3s ease;
    }
    
    .action-buttons .contact-btn:hover {
        border-color: var(--text-main);
        transform: translateY(-2px);
    }
    
    .bottom-cta {
        display: none;
    }
}
