/* 
   VISTA OPTICAL - V5 Professional Theme (Ray-Ban Style Structure)
   Theme Author
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colors */
    --black: #000000;
    --white: #FFFFFF;
    --red: #E30613; /* Ray-Ban Red accent */
    --grey-light: #F2F2F2;
    --grey-medium: #E0E0E0;
    --grey-dark: #333333;
    
    --text-main: #000000;
    --text-secondary: #666666;
    
    --border: #E5E5E5;
    
    /* Spacing */
    --container-width: 1600px; /* Wide layout */
    --header-height: 80px;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    
    /* Effects */
    --transition: all 0.3s ease;
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-top: 110px; /* Header + Topbar height */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
    text-transform: uppercase;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font-family: var(--font-main); }

/* Utility Classes */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 30px; }
.container-fluid { width: 100%; padding: 0 30px; }
.section { padding: 60px 0; }
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.w-100 { width: 100%; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition);
    cursor: pointer;
    border-radius: 0;
}

.btn-primary {
    background-color: var(--black);
    color: var(--white);
    border: 2px solid var(--black);
}

.btn-primary:hover {
    background-color: var(--white);
    color: var(--black);
}

.btn-white {
    background-color: var(--white);
    color: var(--black);
    border: 2px solid var(--white);
}

.btn-white:hover {
    background-color: transparent;
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--black);
    border: 2px solid var(--black);
}

.btn-outline:hover {
    background-color: var(--black);
    color: var(--white);
}

/* Top Bar */
.top-bar {
    background-color: var(--red);
    color: var(--white);
    text-align: center;
    padding: 10px 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
}

/* Header */
.header {
    position: fixed;
    top: 35px; /* Below top bar */
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--white);
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 40px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--red);
    letter-spacing: -0.05em;
}

.nav-menu { display: flex; gap: 30px; }
.nav-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--black);
    text-transform: uppercase;
}
.nav-link:hover { color: var(--red); }

.header-actions { display: flex; gap: 20px; align-items: center; }
.action-icon { font-size: 1.2rem; color: var(--black); }

/* Hero Section */
.hero {
    height: 85vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Left aligned like reference */
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    padding-left: 80px;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 30px;
    display: block;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-buttons { display: flex; gap: 15px; }

/* Category Grid (3 Columns) */
.category-section { padding: 0; }
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 600px;
}

.category-item {
    position: relative;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 40px;
    text-align: center;
    background: #f0f0f0; /* Fallback */
}

.category-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    z-index: 0;
}

.category-item:hover .category-img { transform: scale(1.05); }

.category-content {
    position: relative;
    z-index: 1;
}

.category-title {
    color: var(--white); /* White text as per reference potentially but let's see contrast */
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Product Carousel Section */
.carousel-section { padding: 80px 0; background: var(--grey-light); }
.section-header { text-align: center; margin-bottom: 50px; }
.section-title { font-size: 2rem; margin-bottom: 10px; }
.section-desc { color: var(--text-secondary); font-size: 0.9rem; }

.product-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: none; /* Firefox */
}
.product-carousel::-webkit-scrollbar { display: none; }

.product-card {
    min-width: 300px;
    background: var(--white);
    padding: 20px;
    position: relative;
    transition: var(--transition);
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.product-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--red);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.product-like {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--grey-dark);
    cursor: pointer;
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
}

.product-info { text-align: left; }
.product-name { font-weight: 700; font-size: 1rem; margin-bottom: 5px; text-transform: uppercase; }
.product-price { font-weight: 500; color: var(--text-secondary); }

/* Feature Banners */
.feature-banner {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.feature-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.feature-content {
    position: relative;
    z-index: 1;
    padding: 0 80px;
    max-width: 500px;
    color: var(--white);
}

.feature-content.dark { color: var(--black); }

.feature-title { font-size: 2.5rem; margin-bottom: 20px; }
.feature-desc { font-size: 1rem; margin-bottom: 30px; font-weight: 500; }

/* Sub-banner for Tech/Features */
.tech-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 500px;
    background: #f9f9f9;
}
.tech-img { width: 100%; height: 100%; object-fit: cover; }
.tech-content {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

/* Footer */
.footer { background: var(--black); color: var(--white); padding: 80px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 60px; }
.footer-title { font-size: 0.9rem; margin-bottom: 20px; color: var(--grey-medium); font-weight: 700; text-transform: uppercase;}
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 0.85rem; color: var(--white); font-weight: 500; opacity: 0.7; }
.footer-links a:hover { opacity: 1; }

.newsletter-form { display: flex; border-bottom: 1px solid var(--white); padding-bottom: 10px; margin-top: 20px; }
.newsletter-input { background: none; border: none; color: var(--white); width: 100%; outline: none; }
.newsletter-btn { color: var(--white); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; }

.footer-bottom { 
    border-top: 1px solid #333; 
    padding-top: 30px; 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.75rem; 
    color: var(--grey-dark); 
}

/* Cart Sidebar (Keep standard styles) */
.cart-sidebar {
    position: fixed; top: 0; right: -400px;
    width: 400px; height: 100%; background: var(--white);
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    z-index: 2000; transition: right 0.4s ease;
    padding: 30px; display: flex; flex-direction: column;
}
.cart-sidebar.active { right: 0; }
.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: all 0.3s;
}
.overlay.active { opacity: 1; visibility: visible; }
.cart-header { display: flex; justify-content: space-between; margin-bottom: 30px; align-items: center; }
.cart-header h2 { font-size: 1.5rem; letter-spacing: -0.5px; }
#cart-close { cursor: pointer; font-size: 1.2rem; }

.cart-items { flex: 1; overflow-y: auto; margin-bottom: 30px; }

.cart-item {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}
.cart-item-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-right: 20px;
    background: #f5f5f5;
}
.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cart-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
}
.cart-item-price {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--black);
}
.cart-remove {
    font-size: 0.75rem;
    text-decoration: underline;
    cursor: pointer;
    color: var(--grey-medium);
    text-transform: uppercase;
    font-weight: 600;
}
.cart-remove:hover { color: var(--red); }

.cart-footer { padding-top: 20px; border-top: 2px solid var(--black); }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 25px; font-weight: 800; font-size: 1.2rem; }
.btn-checkout {
    display: block;
    width: 100%;
    background: var(--red);
    color: var(--white);
    text-align: center;
    padding: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
}
.btn-checkout:hover { background: #cc0000; }

/* -- PAGES -- */

/* Product */
.product-detail-section { padding-top: 50px; }
.product-detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 80px; }
.product-gallery { display: grid; gap: 20px; }
.main-image { width: 100%; background: var(--grey-light); aspect-ratio: 4/3; object-fit: contain; }

/* Checkout */
.checkout-section { padding-top: 50px; background-color: var(--white); }
.checkout-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* Account */
.account-section { padding-top: 50px; min-height: 80vh; }
.account-grid { display: grid; grid-template-columns: 250px 1fr; gap: 60px; }
.account-nav { border-right: 1px solid var(--border); padding-right: 30px; }

/* Responsive */
@media (max-width: 900px) {
    .product-detail-grid, .checkout-grid, .account-grid { grid-template-columns: 1fr; gap: 40px; }
    .account-nav { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 20px; margin-bottom: 30px; }
}
@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .category-grid { grid-template-columns: 1fr; height: auto; }
    .category-item { height: 400px; }
    .hero-title { font-size: 2.5rem; }
    .header-wrapper { padding: 0 20px; }
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        padding: 40px 20px;
        border-top: 1px solid var(--border);
        z-index: 900;
        overflow-y: auto;
    }
    .nav-menu.active { display: flex; }
    .nav-link {
        font-size: 1.5rem;
        margin: 15px 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 15px;
        color: var(--black);
    }
    .footer-grid { grid-template-columns: 1fr; }
    .tech-banner { grid-template-columns: 1fr; height: auto; }
    .tech-img { height: 300px; }
    body { padding-top: 70px; }
    
    .top-bar { position: relative; }
    .header { top: 0; height: 70px; }
    .nav-menu { height: calc(100vh - 70px); }
}
