:root {
    --color-bg-deep: #120A07;
    --color-bg-dark: #080808;
    --color-gold: #D4AF37;
    --color-gold-pale: rgba(212, 175, 55, 0.4);
    --color-cream: #FDFBF0;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    
    /* Claymorphism */
    --clay-bg: #1A1A1A;
    --clay-shadow: 
        10px 10px 20px rgba(0, 0, 0, 0.4),
        -5px -5px 15px rgba(255, 255, 255, 0.03),
        inset 5px 5px 10px rgba(255, 255, 255, 0.05),
        inset -5px -5px 15px rgba(0, 0, 0, 0.3);
    --clay-shadow-hover: 
        15px 15px 30px rgba(0, 0, 0, 0.5),
        -8px -8px 20px rgba(255, 255, 255, 0.04),
        inset 8px 8px 15px rgba(255, 255, 255, 0.07),
        inset -8px -8px 20px rgba(0, 0, 0, 0.4);

    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    
    --transition-premium: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    --header-height: 90px;
}

@keyframes breathe {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(212, 175, 55, 0); }
    100% { transform: scale(1.05); box-shadow: 0 0 20px rgba(212, 175, 55, 0.3); }
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

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

body {
    background-color: var(--color-bg-dark);
    color: var(--color-cream);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* Global Header */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-premium);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.1em;
}

.desktop-nav {
    display: none;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
    .hamburger {
        display: none;
    }
}

.nav-link {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-gold);
    transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-gold);
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-btn {
    background: none;
    border: none;
    color: var(--color-cream);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.cart-btn:hover {
    color: var(--color-gold);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--color-gold);
    color: var(--color-bg-dark);
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hamburger */
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.hamburger .bar {
    width: 24px;
    height: 2px;
    background-color: var(--color-cream);
    transition: var(--transition-smooth);
}

.hamburger.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.hamburger.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-bg-deep);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.mobile-menu.is-active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-nav .nav-link {
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

/* Global Footer */
.global-footer {
    background-color: var(--color-bg-deep);
    padding: 6rem 5% 2rem;
    border-top: 1px solid rgba(201, 168, 76, 0.1);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-brand h2 {
    color: var(--color-gold);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.footer-brand p {
    color: rgba(245, 236, 215, 0.7);
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group h3 {
    color: var(--color-gold);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.link-group a {
    display: block;
    margin-bottom: 0.8rem;
    color: rgba(245, 236, 215, 0.7);
}

.link-group a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    max-width: 1400px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(201, 168, 76, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: rgba(245, 236, 215, 0.5);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.socials {
    display: flex;
    gap: 1.5rem;
}

.socials a:hover {
    color: var(--color-gold);
}

/* App Content Area */
#app-content {
    min-height: calc(100vh - var(--header-height));
    margin-top: 0; /* Changed to 0 so hero can overlap if needed, we'll handle padding in views */
    opacity: 1;
    transition: opacity 0.5s ease;
}

#app-content.fade-out {
    opacity: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 3rem;
    border: none;
    background: var(--clay-bg);
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: var(--clay-shadow);
    transition: var(--transition-premium);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--clay-shadow-hover);
    color: var(--color-cream);
}

.btn.breathe {
    animation: breathe 2.5s ease-in-out infinite alternate;
}

/* View Specific Styles Base */
.view-container {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cart Sidebar Styles */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: var(--color-bg-deep);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

.cart-sidebar.is-active {
    transform: translateX(-450px);
}

@media (max-width: 450px) {
    .cart-sidebar.is-active {
        transform: translateX(-100%);
    }
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--color-gold-muted);
}

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

.close-cart {
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--color-gold);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(245, 236, 215, 0.1);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    background: #111;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--color-gold);
    font-weight: 600;
}

.remove-item {
    background: none;
    border: none;
    color: #ff4a4a;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.remove-item:hover {
    text-decoration: underline;
}

.cart-empty-message {
    text-align: center;
    color: var(--color-gold-muted);
    font-style: italic;
    margin-top: 2rem;
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid var(--color-gold-muted);
    background: rgba(10, 10, 10, 0.5);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.total-price {
    color: var(--color-gold);
}

.checkout-btn {
    width: 100%;
    margin: 0;
}

/* ===== Checkout Modal ===== */
.checkout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.checkout-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.checkout-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(0.96);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--color-bg-deep);
    border: 1px solid var(--color-gold-muted);
    border-radius: 12px;
    z-index: 1101;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.checkout-modal.is-active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.hidden { display: none !important; }

/* Override hidden for confirm step when revealed */
#checkout-confirm-step:not(.hidden) {
    display: flex !important;
}

/* Checkout Header */
.checkout-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2.5rem;
    border-bottom: 1px solid var(--color-gold-muted);
}

.checkout-modal-header h2 {
    color: var(--color-gold);
    font-size: 1.6rem;
}

.close-checkout {
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-checkout:hover { color: var(--color-gold); }

/* Checkout Body: 2-column */
.checkout-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    max-height: calc(90vh - 70px);
    overflow: hidden;
}

@media (max-width: 700px) {
    .checkout-body { grid-template-columns: 1fr; }
}

/* Order Summary Side */
.checkout-summary {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-right: 1px solid var(--color-gold-muted);
    overflow-y: auto;
}

.checkout-summary h3 {
    color: var(--color-gold);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.checkout-summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(245,236,215,0.07);
}

.checkout-summary-item img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
    background: #111;
}

.checkout-summary-item-info { flex: 1; font-size: 0.9rem; }
.checkout-summary-item-info strong { display: block; color: var(--color-cream); }
.checkout-summary-item-info span { color: var(--color-gold); font-weight: 600; }

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-cream);
}

.checkout-total-display { color: var(--color-gold); }

/* Form Side */
.checkout-form {
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-section h3 {
    color: var(--color-gold);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-gold-muted);
    margin-bottom: 0.5rem;
}

.form-group input {
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(245,236,215,0.15);
    border-radius: 6px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    margin-bottom: 0;
}

.form-group input:focus {
    border-color: var(--color-gold);
    background: rgba(255,255,255,0.07);
}

.form-group input.error {
    border-color: #ff4a4a;
}

.form-section { margin-bottom: 1.5rem; }

.place-order-btn {
    margin-top: 0.5rem;
    width: 100%;
}

/* Confirmation Step */
#checkout-confirm-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 3rem;
    text-align: center;
}

.order-confirm-icon {
    width: 80px;
    height: 80px;
    background: var(--color-gold);
    color: var(--color-bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.confirm-title {
    font-size: 2rem;
    color: var(--color-gold);
    margin-bottom: 0.75rem;
}

.confirm-subtitle {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    max-width: 400px;
}

.confirm-order-num {
    color: var(--color-cream);
    font-family: var(--font-body);
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.continue-shopping-btn { width: auto; }

