/* ============================================================
   Alka's Jewellery — style.css
   Refined & consolidated. Elegant luxury aesthetic.
   Palette: warm cream #FFF8DC, deep teal #4A8B8C, charcoal #2C2C2C
   Fonts: Cormorant Garamond (display) + Jost (body)
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --cream:       #FFF8DC;
    --cream-dark:  #F5EDCA;
    --teal:        #4A8B8C;
    --teal-light:  #6AABAC;
    --white:       #FFFAFA;
    --charcoal:    #2C2C2C;
    --mid-grey:    #666;
    --light-grey:  #e8e8e8;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Jost', Avenir, Montserrat, sans-serif;
    --radius:      6px;
    --transition:  0.3s ease;
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.08);
    --shadow-md:   0 4px 20px rgba(0,0,0,0.12);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cream);
    color: var(--charcoal);
    font-family: var(--font-body);
    font-weight: 300;
    overflow-x: hidden;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

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

/* ── Header ─────────────────────────────────────────────────── */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--white);
    transition: box-shadow var(--transition);
}

header.scrolled {
    box-shadow: var(--shadow-md);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    min-height: 70px;
    position: relative;
}

/* Logo */
.header-logo-link {
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-logo {
    width: 160px;
    height: auto;
}

/* Hamburger (mobile) */
.menu-button {
    width: 28px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
}

.menuBar {
    background-color: var(--charcoal);
    border-radius: 2px;
    height: 2px;
    width: 100%;
    transition: transform var(--transition), opacity var(--transition);
}

/* Nav */
nav ul {
    display: flex;
    list-style: none;
    gap: 36px;
    align-items: center;
}

nav ul li a {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.05em;
    color: var(--charcoal);
    text-transform: uppercase;
    position: relative;
    transition: color var(--transition);
}

nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1.5px;
    background: var(--teal);
    transition: width var(--transition);
}

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

/* Bag link badge */
.bag-link {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bag-count {
    background: var(--teal);
    color: white;
    font-size: 11px;
    font-weight: 500;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.bag-count.bump {
    transform: scale(1.4);
}

/* Mobile menu hidden by default */
@media (max-width: 768px) {
    .header-logo {
        width: 120px;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 1px solid var(--light-grey);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
        box-shadow: var(--shadow-md);
    }

    .header.nav-active nav {
        max-height: 300px;
        padding: 10px 0 20px;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav ul li a {
        display: block;
        padding: 12px 24px;
        font-size: 14px;
    }

    .header-logo-link {
        position: static;
        transform: none;
        margin: 0 auto;
    }
}

@media (min-width: 769px) {
    .menu-button {
        display: none;
    }

    .header-logo {
        width: 180px;
    }
}

/* ── Bag Sidebar ────────────────────────────────────────────── */
.bag-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1100;
}

.bag-sidebar {
    position: fixed;
    top: 0;
    right: -360px;
    width: 320px;
    height: 100%;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    padding: 24px;
    transition: right var(--transition);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.bag-sidebar.active {
    right: 0;
}

.bag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--light-grey);
}

.bag-header h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
}

.bag-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--mid-grey);
    padding: 0;
    width: auto;
    height: auto;
    line-height: 1;
}

.bag-close:hover {
    color: var(--charcoal);
    background: none;
}

#bagItems {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.bag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--light-grey);
}

.bag-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius);
}

.bag-item span {
    font-size: 14px;
    font-weight: 400;
}

.bag-footer {
    padding-top: 12px;
    border-top: 1px solid var(--light-grey);
}

.clear-bag-btn {
    width: 100%;
    padding: 10px;
    background: var(--charcoal);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition);
}

.clear-bag-btn:hover {
    background: #444;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 60px 20px;
    background: linear-gradient(160deg, var(--cream) 0%, var(--cream-dark) 100%);
}

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

.hero-sub {
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 8vw, 88px);
    font-weight: 300;
    line-height: 1.05;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 16px;
    color: var(--mid-grey);
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-cta {
    display: inline-block;
    padding: 14px 36px;
    border: 1.5px solid var(--charcoal);
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--charcoal);
    transition: background var(--transition), color var(--transition);
    border-radius: var(--radius);
}

.hero-cta:hover {
    background: var(--charcoal);
    color: var(--cream);
}

.scroll-down {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    color: var(--mid-grey);
    cursor: pointer;
    animation: bounce 2.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(10px); }
}

/* ── Jewellery Gallery ──────────────────────────────────────── */
.jewellery-section {
    padding: 80px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

.section-divider {
    width: 48px;
    height: 1.5px;
    background: var(--teal);
    margin: 0 auto;
}

/* Gallery grid — replaces 18 individual thumbnail classes */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 32px;
}

.gallery-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.card-img-wrap {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    background: var(--light-grey);
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    border: 4px solid white;
    border-radius: var(--radius);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(44, 44, 44, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.card-overlay span {
    color: white;
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.7);
    padding: 8px 20px;
    border-radius: var(--radius);
}

.card-img-wrap:hover img {
    transform: scale(1.04);
}

.card-img-wrap:hover .card-overlay {
    opacity: 1;
}

.card-title {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--mid-grey);
    text-align: center;
    letter-spacing: 0.05em;
}

.add-to-bag-btn {
    background: transparent;
    border: 1px solid var(--charcoal);
    color: var(--charcoal);
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 7px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    width: auto;
    height: auto;
}

.add-to-bag-btn:hover {
    background: var(--charcoal);
    color: white;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.88);
    align-items: center;
    justify-content: center;
}

.modal-img {
    max-width: 88vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: auto;
    height: auto;
    transition: opacity var(--transition);
}

.modal-close:hover {
    opacity: 0.6;
    background: none;
}

/* ── Contact Section ────────────────────────────────────────── */
.contact-section {
    background-color: var(--teal);
    padding: 100px 40px;
    margin-top: 80px;
}

.contact-inner {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-text h2 {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 300;
    color: white;
    margin-bottom: 16px;
}

.contact-text p {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 15px;
}

.contact-detail a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Contact page standalone */
.contact-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    background: var(--teal);
    padding: 80px 40px;
}

.contact-page-inner {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.contact-page-inner h1 {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 300;
    color: white;
    margin-bottom: 16px;
}

.contact-page-inner p {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-input {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 40px;
    background: white;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--charcoal);
    outline: none;
    transition: box-shadow var(--transition);
}

.form-input:focus {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.6);
}

.form-textarea {
    border-radius: 20px;
    resize: vertical;
    min-height: 130px;
    padding-top: 14px;
}

.submit-btn {
    align-self: flex-start;
    background: white;
    color: var(--charcoal);
    border: none;
    padding: 13px 36px;
    border-radius: 40px;
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    width: auto;
    height: auto;
}

.submit-btn:hover {
    background: var(--charcoal);
    color: white;
    transform: translateY(-1px);
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
    padding: 48px 24px 32px;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-top: 1px solid var(--light-grey);
    gap: 12px;
}

.footer-logo {
    width: 160px;
    height: auto;
    margin-bottom: 8px;
}

.footer-contact a {
    color: var(--mid-grey);
    font-size: 14px;
    font-weight: 400;
    transition: color var(--transition);
}

.footer-contact a:hover {
    color: var(--charcoal);
}

.footer-copy {
    font-size: 12px;
    color: #aaa;
    letter-spacing: 0.05em;
}

/* ── Responsive Adjustments ─────────────────────────────────── */
@media (max-width: 768px) {
    .jewellery-section {
        padding: 60px 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .contact-inner,
    .contact-page-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-section,
    .contact-page {
        padding: 60px 24px;
    }

    .hero {
        min-height: calc(100vh - 60px);
        padding: 40px 20px 80px;
    }

    .scroll-down {
        bottom: 20px;
    }

    .form-input {
        width: 100%;
    }

    .submit-btn {
        align-self: stretch;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}