:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --accent: #22c55e;
    --accent-dark: #16a34a;
    --line: #334155;
    --sand: #38bdf8;
    --danger: #b42318;
    --shadow: 0 14px 40px rgba(2, 6, 23, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--ink);
    position: relative;
    z-index: 1;
    background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.12), transparent 35%),
    linear-gradient(180deg, #0b1223 0%, #0f172a 100%);
}

body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: var(--watermark-image, url('/assets/img/flglogo.png')) no-repeat center;
    background-size: contain;
    opacity: 0.05;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.container,
.section,
.card {
    position: relative;
    z-index: 2;
}

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

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

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(15, 23, 42, 0.82);
    border-bottom: 1px solid rgba(51, 65, 85, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    background: #0b1223;
    border: 1px solid var(--line);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-nav a,
.admin-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.admin-nav a:hover {
    background: #0b1223;
    color: #fff;
}

.hero {
    padding: 72px 0 48px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: stretch;
}

.hero-copy,
.hero-panel,
.section-card,
.filter-panel,
.card,
.admin-card,
.login-card,
.table-wrap {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(51, 65, 85, 0.95);
    box-shadow: var(--shadow);
    border-radius: 28px;
}

.hero-copy {
    padding: 42px;
}

.hero-copy h1 {
    font-size: clamp(2.3rem, 5vw, 4.6rem);
    line-height: 0.95;
    margin: 0 0 18px;
}

.hero-copy p,
.section-head p,
.muted,
.empty-state {
    color: var(--muted);
    line-height: 1.7;
}

.hero-actions,
.action-row,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.btn,
button,
input[type='submit'] {
    border: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 12px 20px;
    font: inherit;
    transition: 0.2s ease;
}

.btn,
button,
input[type='submit'] {
    background: var(--accent);
    color: #fff;
}

.btn:hover,
button:hover,
input[type='submit']:hover {
    background: var(--accent-dark);
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn-whatsapp {
    background: #1fa655;
}

.hero-panel {
    padding: 24px;
    display: grid;
    gap: 16px;
}

.stat-box {
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.12), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.stat-box strong {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}

.section {
    padding: 16px 0 56px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
}

.grid,
.product-grid,
.instagram-grid,
.admin-stats {
    display: grid;
    gap: 18px;
}

.grid,
.product-grid,
.admin-stats {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.instagram-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    overflow: hidden;
}

.card-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    display: grid;
    place-items: center;
    padding: 14px;
}

.card-media img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    object-fit: contain;
    object-position: center;
}

.card-body {
    padding: 18px;
}

.card h3,
.section-card h2,
.admin-card h2,
.login-card h1 {
    margin: 0 0 10px;
}

.meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag,
.meta span {
    padding: 6px 10px;
    background: rgba(34, 197, 94, 0.15);
    color: #bbf7d0;
    border-radius: 999px;
    font-size: 0.9rem;
}

.layout-two {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}

.filter-panel,
.section-card,
.admin-card,
.table-wrap,
.login-card {
    padding: 24px;
}

.filter-panel {
    position: sticky;
    top: 98px;
}

.filter-box {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.5);
}

.filter-box h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.filter-box label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-weight: 500;
}

.feature-group-list {
    display: grid;
    gap: 12px;
}

.feature-group h4 {
    margin: 0 0 8px;
}

form {
    display: grid;
    gap: 14px;
}

label {
    font-weight: 700;
    font-size: 0.95rem;
}

input,
select,
textarea {
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #0b1223;
    color: var(--ink);
    font: inherit;
}

input[type='checkbox'],
input[type='radio'] {
    width: auto;
    margin-top: 0;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.site-footer {
    background: #020817;
    color: #f3f4f6;
    margin-top: 52px;
    padding-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.site-footer a {
    display: block;
    color: #dbe3ec;
    margin-bottom: 10px;
}

.footer-banner {
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 24px;
}

.footer-copy {
    padding: 22px 0;
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #b8c2cc;
}

.notice {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(34, 197, 94, 0.15);
    color: #bbf7d0;
}

.notice.error {
    background: rgba(180, 35, 24, 0.1);
    color: var(--danger);
}

.table-wrap {
    overflow-x: auto;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-body {
    background: #0b1223;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    padding: 28px;
    background: #020817;
    color: #fff;
}

.sidebar {
    width: 250px;
    transition: width 0.3s ease;
}

.sidebar.closed {
    width: 70px;
}

.sidebar.closed .admin-brand,
.sidebar.closed .admin-nav a {
    opacity: 0;
    pointer-events: none;
}

.sidebar-toggle {
    background: #0f172a;
    border: 1px solid var(--line);
    margin-bottom: 14px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.admin-brand img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-main {
    flex: 1;
    padding: 28px;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(520px, 100%);
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(17, 24, 39, 0.85);
    padding: 24px;
    z-index: 50;
}

.lightbox.active {
    display: grid;
}

.lightbox img {
    width: auto;
    height: auto;
    max-width: min(1100px, calc(100vw - 64px));
    max-height: calc(100vh - 64px);
    object-fit: contain;
    border-radius: 24px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
}

.delete-form {
    display: inline-flex;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    place-items: center;
    background: rgba(2, 6, 23, 0.82);
    padding: 20px;
}

.modal.active {
    display: grid;
}

.modal-content {
    width: min(720px, 100%);
    background: #0f172a;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 20px;
    position: relative;
    max-height: min(88vh, 900px);
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.detail-media {
    display: grid;
    place-items: center;
    min-height: clamp(240px, 46vh, 420px);
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(11, 18, 35, 0.95));
    overflow: hidden;
}

.detail-media img {
    border-radius: 16px;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(62vh, 520px);
    margin: auto;
    object-fit: contain;
    object-position: center;
}

.detail-copy {
    margin-top: 16px;
}

.detail-copy h3 {
    margin-bottom: 8px;
}

.detail-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background: #0b1a2b;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #1e2f45;
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #1e2f45;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
}

.cart-item {
    border-bottom: 1px solid #1e2f45;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-details span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7fc2ff;
}

.cart-item strong {
    font-size: 0.95rem;
}

.cart-item-price {
    font-size: 0.85rem;
    color: #bbf7d0;
}

.cart-item button {
    padding: 8px 12px;
}

.cart-footer {
    padding: 15px;
    border-top: 1px solid #1e2f45;
}

.cart-footer .btn {
    width: 100%;
}

.feature-list {
    margin-top: 8px;
}

.feature-list .tag {
    display: inline-block;
}

@media (max-width: 900px) {
    .hero-grid,
    .layout-two,
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
    }

    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        padding-bottom: 12px;
    }

    .cart-drawer {
        width: min(100%, 350px);
    }

    .detail-media {
        min-height: 220px;
        padding: 12px;
    }

    .lightbox img {
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 32px);
    }
}
