:root {
    --bg-dark: #0a0a0c;
    --text-main: #f5f5f7;
    --text-muted: #a1a1aa;
    --accent-red: #d32f2f;
    --accent-gold: #c5a059;
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

/* Defensive override to crush hosting-injected padding/margins on live domains */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
    top: 0 !important;
    max-width: 100% !important;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Soft color transition setup */
    transition: background-color 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sharp elements, soft gradients */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 6%;
    background: linear-gradient(to bottom, rgba(10, 10, 12, 0.95) 0%, rgba(10, 10, 12, 0) 100%);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.logo {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    font-family: 'Cinzel', serif;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.logo span {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 5px;
    margin-top: -3px;
    margin-left: 0;
    color: var(--accent-gold);
}

nav {
    display: flex;
    gap: 3rem;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 1px;
    /* Sharp edge */
    background: var(--text-main);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-btn:hover {
    color: var(--text-main);
}

.nav-btn:hover::after,
.nav-btn.active::after {
    width: 100%;
}

.nav-btn.active {
    color: var(--text-main);
    font-weight: 600;
}

#main-content {
    margin-top: 140px;
    flex: 1;
    position: relative;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0 6% 4rem 6%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateY(30px);
}

.page.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    height: auto;
    overflow: visible;
    transform: translateY(0);
    position: relative;
    /* Take up space */
}

/* Hero Section */
.hero {
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 900px;
}

h1 {
    font-size: 5rem;
    line-height: 1.05;
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(120deg, var(--text-main), #555);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 3.5rem;
    max-width: 650px;
    line-height: 1.7;
    font-weight: 300;
}

.primary-btn {
    padding: 1.2rem 3rem;
    background: var(--text-main);
    color: var(--bg-dark);
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    /* Sharp edge requirement */
    border-radius: 0px;
    letter-spacing: 1px;
}

.primary-btn:hover {
    transform: translateY(-4px);
    background: #fff;
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.05);
}

/* Page Content */
.page-content {
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

h2 {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    letter-spacing: -0.5px;
}

.page-content>p {
    color: var(--text-muted);
    margin-bottom: 4rem;
    font-size: 1.3rem;
    font-weight: 300;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    /* Sharp edges */
    border-radius: 0px;
    transition: background 0.5s ease, border-color 0.5s ease, transform 0.5s ease;
    cursor: default;
}

#tea .product-card,
#tea .card-image {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.03) !important;
}

.product-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    height: 240px;
    margin-bottom: 2rem;
    /* Sharp edge and blend mode for images */
    background-color: #050505;
    transition: filter 0.5s ease, transform 0.5s ease;
    filter: brightness(0.9) contrast(1.1) grayscale(10%);
    /* Ensure images sit nicely without repeating */
    background-repeat: no-repeat;
    background-position: center center !important;
    /* Optional: add a tiny inner shadow for depth if needed, but keeping it flat and modern is better */
}

.product-card:hover .card-image {
    filter: brightness(1.1) contrast(1.1) grayscale(0%);
    transform: scale(1.05);
}

.bg-tea-1 {
    background: radial-gradient(circle at 0% 0%, #0d2616, #06160b);
}

.bg-tea-2 {
    background: radial-gradient(circle at 100% 100%, #173820, #041007);
}

.bg-tea-3 {
    background: radial-gradient(circle at 50% 50%, #1e4528, #051409);
}

.bg-clean-1 {
    background: linear-gradient(135deg, #0d47a1, #041229);
}

.bg-clean-2 {
    background: linear-gradient(135deg, #00838f, #002225);
}

.bg-clean-3 {
    background: linear-gradient(135deg, #4527a0, #130a2e);
}

.product-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.product-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 300;
}

.contact-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 4rem;
    /* Sharp edge */
    border-radius: 0;
    max-width: 700px;
}

.contact-box p {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    font-weight: 300;
}

.contact-link {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 1px solid transparent;
}

.contact-link:hover {
    color: var(--accent-gold);
    border-bottom: 1px solid var(--accent-gold);
}

/* References Marquee */
.references-section {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    padding: 2rem 0;
    overflow: hidden;
    background: linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.05) 50%, transparent);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    /* switch to flex */
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    animation: scrollMarquee 45s linear infinite;
    gap: 0;
    will-change: transform;
    /* Hint to the browser for GPU hardware acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.reference-item {
    display: inline-flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    /* Default serif */
    color: var(--text-main);
    padding: 0 4rem;
    position: relative;
    transition: all 0.3s ease;
    cursor: default;
    letter-spacing: 1px;
}

.reference-item .fw-light {
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-left: 6px;
    transition: color 0.3s ease;
}

/* Corporate Image Logos Styling */
.corp-logo {
    height: 45px;
    width: auto;
    filter: grayscale(10%);
    /* Slight mute to fit corporate theme, but retains brand color */
    transition: filter 0.3s ease, transform 0.3s ease;
    object-fit: contain;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.reference-item:hover .corp-logo {
    filter: grayscale(0%);
    transform: scale(1.08);
    /* slight pop on hover */
}

.reference-item::after {
    content: '•';
    position: absolute;
    right: 0;
    color: var(--glass-border);
}

@keyframes scrollMarquee {
    0% {
        transform: translateX(0);
    }

    /* Transform left by 50% since we duplicated the content perfectly */
    100% {
        transform: translateX(-50%);
    }
}

/* Canvas for tea effect */
#tea-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    /* Allows clicking through the canvas */
    z-index: 1;
    /* Below the content */
    opacity: 0;
    transition: opacity 1.5s ease;
}

/* Canvas for globe effect */
#globe-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    opacity: 1;
    /* Starts visible */
    transition: opacity 1s ease;
}

/* Admin Panel Styles */
.admin-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
}

.admin-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--text-muted);
}

.admin-products-list h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-muted);
}

#admin-product-ul {
    list-style: none;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 1rem;
}

.admin-list-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-list-item-img {
    width: 50px;
    height: 50px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin-right: 1rem;
}

.admin-list-info {
    flex: 1;
}

.admin-list-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.admin-list-info h4 {
    margin: 0 0 0.3rem 0;
}

.del-btn {
    background: none;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.del-btn:hover {
    background: var(--accent-red);
    color: #fff;
}

.secondary-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.secondary-btn:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.3);
}

.secondary-btn.active {
    background: var(--text-main);
    color: #000;
    border-color: var(--text-main);
}

.tab-content {
    animation: fadeInTab 0.4s ease-out forwards;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer styling */
.site-footer {
    text-align: center;
    padding: 2rem 6%;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    font-weight: 300;
}

/* Fade in canvas only when tea page is active */
body[data-active-page="tea"] #tea-canvas {
    opacity: 1;
}

/* Mobile Responsiveness & Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    /* Above mobile menu */
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-main);
    transition: all 0.3s ease;
}

/* Hamburger active state (X shape) */
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .admin-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    #nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(6, 6, 8, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transform: translateY(-100%);
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        backdrop-filter: blur(15px);
    }

    #nav-menu.active {
        transform: translateY(0);
    }

    .nav-btn {
        font-size: 1.8rem;
    }

    .page {
        padding: 120px 5% 3rem 5%;
    }

    #main-content {
        margin-top: 100px;
    }

    .hero {
        height: auto;
        min-height: calc(100vh - 200px);
        text-align: center;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.1rem;
        text-align: center;
    }

    h2 {
        font-size: 2rem;
    }

    .tab-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Mobile adjustments for corporate logos marquee */
    .reference-item {
        padding: 0 2rem;
    }

    .corp-logo {
        height: 30px !important;
    }
}