:root {
    --primary-color: #8B0000;
    --text-color: #333;
    --bg-color: #fff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    margin-left: 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 10px;
    margin-left: 30px;
    margin-right: 20px;
}

.lang-switcher button {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: #999;
    font-size: 0.9rem;
    padding: 5px;
}

.lang-switcher button:hover {
    color: var(--primary-color);
}

.lang-switcher button.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.cart-icon {
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    margin-left: 10px;
    color: var(--text-color);
    transition: color 0.3s;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    padding-top: 80px;
    background: #f9f9f9;
}

.hero-content {
    max-width: 500px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #666;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.cta-button:hover {
    background: #5a0000;
}

.hero-image img {
    max-height: 80vh;
    width: auto;
    object-fit: contain;
}

/* Scroll Showcase */
.scroll-showcase {
    height: 300vh;
    position: relative;
    background: #f9f9f9; /* Changed to light background for elegance */
    color: var(--text-color);
}

.sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    gap: 50px; /* Ensure separation between text and image */
}

.text-panel {
    width: 350px;
    padding: 40px;
    z-index: 10;
    position: relative; /* Fixed: Relative positioning for absolute children */
    min-height: 200px; /* Ensure height for text */
}

.text-panel h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.feature-text {
    position: absolute;
    top: 180px; /* Adjusted to clear the H2 completely */
    left: 40px; /* Align with padding */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s;
    width: 300px; /* Constrain width */
}

.feature-text.active {
    opacity: 1;
    transform: translateY(0);
}

.feature-text h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature-text p {
    font-size: 1.1rem;
    color: #555;
}

.image-panel {
    position: relative;
    width: 400px;
    height: 600px;
    /* Optional: Add shadow or border for elegance */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.model-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure full image is visible with no cropping */
    object-position: center; /* Center the image */
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.model-view.active {
    opacity: 1;
}

/* Size Table */
.size-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.size-table th, .size-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
}

.size-table th {
    background-color: var(--primary-color);
    color: white;
}

.size-table tr:hover {
    background-color: #f5f5f5;
}

/* Product Details */
.product-details {
    padding: 100px 50px;
    background-color: var(--bg-color);
}

.product-details .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: white;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
    width: calc((100% - 60px) / 3);
    min-width: 300px; /* Ensure they don't get too squished */
}

@media (max-width: 1024px) {
    .product-details .container {
        /* Keep flex but adjust width for 2 columns */
    }
    .product-card {
        width: calc((100% - 30px) / 2);
    }
}

@media (max-width: 600px) {
    .product-details .container {
        flex-direction: column;
    }
    .product-card {
        width: 100%;
    }
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    margin-bottom: 20px;
}

.product-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 10px;
}

.product-card .price {
    display: block;
    margin-top: 10px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Purchase Section */
.purchase-section {
    padding: 100px 20px;
    background-color: white;
    text-align: center;
}

.purchase-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.purchase-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    background: var(--bg-color);
    padding: 40px;
    border: 1px solid #eee;
}

.product-selector, .size-selector {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

select {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    background: white;
    font-family: var(--font-body);
    font-size: 1rem;
}

.sizes {
    display: flex;
    gap: 10px;
}

.sizes input[type="radio"] {
    display: none;
}

.sizes label {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.sizes input[type="radio"]:checked + label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.total-price {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    margin-bottom: 30px;
    text-align: right;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.buy-btn {
    width: 100%;
    padding: 20px;
    background-color: var(--text-color);
    color: white;
    border: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.3s;
}

.buy-btn:hover {
    background-color: var(--primary-color);
}

/* Policy Modal */
.policy-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background-color: var(--bg-color);
    z-index: 2000;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow-y: auto;
    display: none; /* Hidden by default */
    border-radius: 4px;
}

.policy-modal.open {
    display: block;
}

.policy-content {
    position: relative;
    color: var(--text-color);
}

.policy-content h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.policy-content h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.policy-content p, .policy-content li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.policy-content ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}

.policy-content .close-btn {
    position: absolute;
    top: -20px;
    right: -20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.6;
    transition: opacity 0.3s;
}

.policy-content .close-btn:hover {
    opacity: 1;
}

/* Scrollbar for modal */
.policy-modal::-webkit-scrollbar {
    width: 8px;
}

.policy-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.policy-modal::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.policy-modal::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px;
    background-color: var(--text-color);
    font-size: 0.8rem;
    color: #f5f5f5;
}

/* Cart Sidebar Styles */
.cart-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-left: 30px;
    color: var(--text-color);
    transition: color 0.3s;
}

.cart-icon:hover {
    color: var(--primary-color);
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    z-index: 2000;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.cart-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-items {
    margin-bottom: 30px;
}

.shipping-form-container h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: #666;
    text-transform: none;
    letter-spacing: 0;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cart-item-info h4 {
    font-family: var(--font-heading);
    margin-bottom: 5px;
}

.cart-item-info p {
    font-size: 0.9rem;
    color: #666;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 5px;
    text-decoration: underline;
}

.cart-item-remove:hover {
    color: var(--primary-color);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.form-group.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.form-group.checkbox-group input {
    width: auto;
}

.form-group.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
}

.form-group.checkbox-group a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cart-subtotal,
.cart-shipping {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #666;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 700;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    margin-top: 15px;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.3s;
}

.checkout-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.checkout-btn:hover:not(:disabled) {
    background-color: #991b1b;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Cart */
@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 768px) {
    /* Header Responsive */
    header {
        flex-direction: column;
        padding: 15px 20px;
        height: auto;
    }

    .logo {
        margin-bottom: 10px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
        width: 100%;
    }

    nav a {
        margin: 5px 10px;
        font-size: 0.8rem;
    }

    .lang-switcher {
        margin: 15px 0 10px;
        justify-content: center;
        width: 100%;
    }

    .cart-icon {
        margin: 10px 0;
    }

    /* Hero Responsive */
    .hero {
        flex-direction: column;
        height: auto;
        padding: 240px 20px 60px; /* Increased top padding for larger header */
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-image {
        height: 50vh;
        width: 100%;
    }

    /* Scroll Showcase Responsive */
    .scroll-showcase {
        height: auto;
        min-height: auto;
    }

    .sticky-container {
        position: relative;
        flex-direction: column;
        padding: 20px;
        height: auto;
        top: 0;
    }

    .text-panel {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
        height: auto;
        display: block;
    }

    .feature-text {
        position: relative;
        top: 0;
        left: 0;
        opacity: 1;
        visibility: visible;
        margin-bottom: 20px;
        width: 100%;
        transform: none;
    }
    
    .feature-text h3 {
        font-size: 1.2rem;
    }

    .feature-text p {
        font-size: 0.9rem;
    }

    .image-panel {
        width: 100%;
        height: 60vh;
        margin-left: 0;
    }
    
    .model-view {
        object-fit: contain;
        object-position: center top;
        height: 100%;
    }

    /* Product Details Responsive */
    .product-details {
        padding: 60px 20px;
    }

    .product-details .container {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 30px;
    }

    /* Purchase Section Responsive */
    .purchase-section {
        padding: 60px 20px;
    }
    
    .purchase-form {
        padding: 20px;
        width: 100%;
    }
}


