/* Shared UI styles used by index.html and product.html */

:root {
    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #333333;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #f8f9fa;
    --border-color: #eee;
    --shadow: rgba(0, 0, 0, 0.1);
    --hero-overlay: rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #f8f9fa;
    --text-primary: #f8f9fa;
    --text-secondary: #cccccc;
    --text-light: #333333;
    --border-color: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
    --hero-overlay: rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: 'Decimal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: small;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Header */
header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(80px);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] header {
    background: rgba(26, 26, 26, 0.9);
    border-bottom-color: var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Use hamburger as the only primary menu */
.header-right nav { display: none; }
.hamburger { display: inline-flex; }

.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: white;
}

.theme-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    min-width: 50px;
}

.theme-toggle:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ccc;
}

/* Extra spacing before the theme icon item */
.header-right nav ul li:last-child {
    margin-left: 14px;
}

/* Mobile nav */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.95);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    z-index: 2000;
    height: 100vh;
    padding-top: var(--header-height, 70px);
    overflow-y: auto;
}

.nav-menu.active {
    transform: translateY(0);
}

.nav-menu ul {
    list-style: none;
    padding: 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 16px;
}

.hamburger {
    width: 28px;
    height: 22px;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2101;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 2px;
    background: white;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Section headings */
.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 30px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 80px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    transition: color 0.3s ease;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.cta-button:hover {
    background: white;
    color: #333;
}

.select-button {
    display: inline-block;
    padding: 10px 26px;
    background: var(--text-primary);
    color: var(--bg-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--text-primary);
}

.select-button:hover {
    background: transparent;
    color: var(--text-primary);
}

/* Standardized preorder button to match product modal look and feel */
.preorder-btn {
    padding: 16px 26px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: 1px solid var(--text-primary);
    border-radius: 0px;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.preorder-btn:hover {
    background: transparent;
    color: var(--text-primary);
}

/* Links inside content */
.back-link {
    color: var(--text-primary);
}

/* Product page layout */
.product-page { padding: 120px 0; }
.product-page .product-toolbar { display: flex; gap: 12px; align-items: center; }
.product-page .buy-actions { display: flex; gap: 10px; }
.product-wrap { display: grid; grid-template-columns: 1.2fr 1fr; margin-top: 30px; }
.product-page .buy-actions .preorder-btn { width: 100%; margin-top: 10px; }
@media (max-width: 900px) { .product-wrap { grid-template-columns: 1fr; } }

/* Optional legacy selector support */
.product-page .color-selector { padding: 10px 12px; border-radius: 0px; border: 1px solid rgba(255,255,255,0.3); background: transparent; color: #fff; }

/* Thumbnails under slider */
.slider-thumbs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.slider-thumbs .thumb { width: 70px; height: 70px; border: 1px solid var(--border-color); overflow: hidden; cursor: pointer; opacity: .8; transition: opacity .2s ease, border-color .2s ease; background: var(--bg-primary); }
.slider-thumbs .thumb:hover { opacity: 1; }
.slider-thumbs .thumb.active { border-color: var(--text-primary); opacity: 1; }
.slider-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* Variant selector buttons */
.color-selection-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.selection-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.color-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-button {
    padding: 12px 14px;
    font-size: 14px;
    letter-spacing: .5px;
    border: 1px solid var(--text-primary);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all .2s ease;
    border-radius: 0px;
}

.color-button:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.color-button.active {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* Accordions */
.accordion .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion.active .accordion-content {
    /* height set inline via JS */
}

.accordion .accordion-icon {
    transition: transform 0.2s ease;
}

.accordion.active .accordion-icon {
    transform: rotate(45deg);
}

/* Put the plus icon in front of the title on one row */
.accordion .accordion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
}

.accordion .accordion-icon {
    order: -1;
}

/* Specs accordion enhancements (product page) */
.specs .container {
    padding-left: 32px;
    padding-right: 32px;
    padding-bottom: 32px;
}

.specs .specs-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.specs .specs-hero,
.specs .specs-accordion {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.specs .specs-accordion {
    max-width: 1000px;
}
.specs-accordion .accordion {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-primary);
}

.specs-accordion .spec-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    column-gap: 28px;
    row-gap: 16px;
}

.specs-accordion .spec-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}

.specs-accordion .spec-item:last-child {
    border-bottom: none;
}

.specs-accordion .spec-label {
    font-weight: 600;
    color: var(--text-primary);
}

.specs-accordion .spec-value {
    color: var(--text-secondary);
    text-align: right;
}

@media (max-width: 768px) {
    .specs .container { padding-left: 20px; padding-right: 20px; }
    .specs .specs-layout { gap: 20px; }
    .specs-accordion .spec-list { grid-template-columns: 1fr; column-gap: 16px; row-gap: 12px; }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: var(--text-primary);
}

.modal h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 300;
}

.modal p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal ul {
    color: var(--text-secondary);
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal ul li {
    margin-bottom: 8px;
}

/* Offset anchor scroll for fixed header */
section[id] {
    scroll-margin-top: 90px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.2rem;
    }

    nav ul {
        gap: 15px;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    .header-right {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .header-right nav ul {
        gap: 20px;
    }

    .modal-content {
        margin: 10% auto;
        padding: 30px;
        width: 95%;
    }
}

/* Footer (shared) */
footer {
    padding: 60px 0 30px;
    background: #222;
    color: white;
}

[data-theme="dark"] footer {
    background: #111;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-links a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ccc;
}

/* Contact (shared) */
.contact {
    padding: 120px 0;
    background: var(--bg-tertiary);
    color: var(--text-light);
    text-align: center;
    transition: background-color 0.3s ease;
}

.contact h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 40px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-light);
}

.contact-info {
    margin-bottom: 50px;
    color: var(--text-light);
}

.preorder-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.preorder-form input,
.preorder-form select,
.preorder-form textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-light);
    font-family: 'Decimal', sans-serif;
    border-radius: 0px;
    transition: border-color 0.3s ease;
}

.preorder-form input,
.preorder-form select { flex: 1; }

.preorder-form textarea {
    width: 100%;
    resize: vertical;
    margin-bottom: 20px;
}

.preorder-form input::placeholder,
.preorder-form textarea::placeholder { color: #ccc; }

[data-theme="dark"] .preorder-form input,
[data-theme="dark"] .preorder-form select,
[data-theme="dark"] .preorder-form textarea { border-color: #555; }

.preorder-form input:focus,
.preorder-form select:focus,
.preorder-form textarea:focus {
    outline: none;
    border-color: var(--text-light);
}

.preorder-form button {
    width: 100%;
    padding: 20px;
    background: var(--text-light);
    color: var(--bg-tertiary);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    border-radius: 0px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.preorder-form button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.preorder-note {
    text-align: center;
    color: #ccc;
    font-style: italic;
}
