:root {
    --bg: #f4f8ff;
    --bg-2: #eaf2ff;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #ffffff;
    --line: rgba(144, 174, 222, 0.28);
    --line-strong: rgba(98, 138, 208, 0.35);
    --text: #173b70;
    --text-2: #294f88;
    --muted: #6e86a8;
    --accent: #4a95ff;
    --accent-2: #77c4ff;
    --accent-3: #d5ebff;
    --danger: #ef6a7d;
    --success: #1aa36b;
    --warning: #f4b04f;
    --shadow-1: 14px 14px 32px rgba(155, 186, 230, 0.24);
    --shadow-2: -14px -14px 28px rgba(255, 255, 255, 0.95);
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(137, 188, 255, 0.35), transparent 28%),
        radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.8), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
}

a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { border: 0; }
textarea { resize: vertical; }

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(245, 250, 255, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(155, 190, 235, 0.24);
}
.site-header.compact { position: static; }

.header-inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo-wrap {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    padding: 6px;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff, #e3efff);
    box-shadow: var(--shadow-1), var(--shadow-2);
}
.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}
.brand strong {
    display: block;
    font-size: 1.08rem;
    white-space: nowrap;
}
.brand small,
.eyebrow,
.section-note,
.muted-text,
.mini-label,
.remove-link { color: var(--muted); }
.brand small { display: block; margin-top: 4px; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.panel {
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(239,246,255,0.98));
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-1), var(--shadow-2), inset 0 1px 0 rgba(255,255,255,0.95);
}
.nested-panel {
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(160, 190, 230, 0.22);
    background: linear-gradient(145deg, rgba(255,255,255,0.88), rgba(232,242,255,0.88));
}

.ghost-link,
.cart-link,
.button-primary,
.button-secondary,
.button-danger,
.button-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
    text-align: center;
}
.ghost-link,
.button-secondary,
.cart-link {
    color: var(--text);
    background: linear-gradient(145deg, #ffffff, #e6f1ff);
    border-color: rgba(150, 182, 228, 0.32);
    box-shadow: 10px 10px 18px rgba(162, 187, 225, 0.2), -8px -8px 18px rgba(255,255,255,0.92);
}
.button-primary {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    box-shadow: 12px 12px 22px rgba(118, 164, 227, 0.22), inset 0 1px 0 rgba(255,255,255,0.2);
}
.button-danger {
    color: #fff;
    background: linear-gradient(135deg, #ff8da0, var(--danger));
    box-shadow: 10px 10px 18px rgba(220, 150, 165, 0.22);
}
.button-disabled {
    color: var(--muted);
    cursor: not-allowed;
    background: linear-gradient(145deg, #f4f7fd, #e4ecf8);
    border-color: rgba(165, 183, 215, 0.24);
    opacity: .72;
}
.ghost-link:hover,
.cart-link:hover,
.button-primary:hover,
.button-secondary:hover,
.button-danger:hover { transform: translateY(-1px); }
.ghost-link:active,
.cart-link:active,
.button-primary:active,
.button-secondary:active,
.button-danger:active { transform: translateY(0); }
.inline-button { width: auto; }
.text-center { text-align: center; }

.cart-link span {
    min-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 8px;
    background: rgba(74, 149, 255, 0.14);
    color: var(--accent);
    font-size: .85rem;
    font-weight: 700;
}

main { padding-bottom: 48px; }
.hero-jewel { padding: 28px 0 20px; }
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
    gap: 22px;
}
.luxury-copy,
.hero-stage,
.product-card,
.gallery-panel,
.product-info-panel,
.cart-items-panel,
.checkout-panel,
.empty-state,
.admin-section,
.admin-login-card,
.stat-box,
.admin-card-link { padding: 26px; }
.eyebrow {
    margin: 0 0 10px;
    font-size: .73rem;
    text-transform: uppercase;
    letter-spacing: .18em;
}
.hero-copy h1,
.product-info-panel h1,
h2,
h3 { margin: 0; line-height: 1.08; }
.hero-copy h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.hero-text {
    margin: 18px 0 0;
    max-width: 620px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-2);
}
.hero-buttons,
.admin-action-row {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.hero-note-list {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hero-note-list span,
.product-category {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(79, 150, 255, 0.08);
    color: var(--text-2);
    font-size: .9rem;
    border: 1px solid rgba(138, 178, 235, 0.2);
}

.hero-stage { min-height: 100%; }
.hero-collage {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(150px, .8fr);
    gap: 14px;
    height: 100%;
}
.hero-collage-main,
.hero-collage-side img,
.media-frame {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(160, 190, 230, 0.24);
    background: linear-gradient(145deg, #ffffff, #edf5ff);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}
.hero-collage-main img,
.hero-collage-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-collage-side {
    display: grid;
    gap: 14px;
}
.hero-collage-main { min-height: 420px; }
.hero-collage-side img { min-height: 203px; }
.media-frame {
    padding: 10px;
    min-height: 420px;
}
.hero-video {
    width: 100%;
    min-height: 400px;
    border: 0;
    border-radius: 18px;
    background: #dbe9ff;
}

.section-head {
    margin: 18px 0 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.section-note { margin: 0; max-width: 560px; line-height: 1.6; }
.no-top-gap { margin-top: 8px; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.storefront-card {
    display: grid;
    grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
}
.product-thumb,
.luxury-thumb {
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff, #eef4ff);
    border: 1px solid rgba(155, 190, 235, 0.2);
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.product-topline,
.price-row,
.detail-price-row,
.checkout-summary,
.split-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.stock-badge {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: .86rem;
    font-weight: 700;
}
.in-stock { background: rgba(26, 163, 107, 0.14); color: var(--success); }
.out-stock { background: rgba(239, 106, 125, 0.12); color: var(--danger); }
.product-description,
.detail-description,
.cart-item-info p,
.admin-card-link p { margin: 0; line-height: 1.65; color: var(--text-2); }
.product-points {
    margin: 0;
    padding-left: 18px;
    color: var(--text-2);
    line-height: 1.6;
}
.product-config-form,
.stack-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-column-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: flex; flex-direction: column; gap: 8px; }
label > span { font-size: .9rem; font-weight: 600; color: var(--text-2); }
.field {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(155, 190, 235, 0.28);
    color: var(--text);
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(236,244,255,0.95));
    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.92);
}
.field:focus {
    border-color: rgba(74, 149, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(74, 149, 255, 0.1), inset 1px 1px 0 rgba(255,255,255,0.92);
}
.textarea-field { min-height: 110px; }
.large-area { min-height: 170px; }
.checkbox-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
}
.checkbox-row input { width: 18px; height: 18px; }
.live-price,
.detail-price,
.line-total,
.stat-box strong {
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    font-weight: 800;
    color: var(--text);
}
.row-actions { justify-content: flex-end; }

.product-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.qty-input {
    min-height: 46px;
    width: 92px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(155, 190, 235, 0.28);
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(236,244,255,0.95));
    color: var(--text);
}

.site-footer {
    padding: 18px 0 30px;
    border-top: 1px solid rgba(155, 190, 235, 0.18);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-size: .94rem;
}

.flash {
    margin: 14px 0 0;
    padding: 14px 16px;
    border-radius: 18px;
    font-weight: 600;
    border: 1px solid transparent;
}
.flash.success { background: rgba(26, 163, 107, 0.12); color: var(--success); border-color: rgba(26, 163, 107, 0.18); }
.flash.error { background: rgba(239, 106, 125, 0.12); color: var(--danger); border-color: rgba(239, 106, 125, 0.18); }

.breadcrumbs {
    margin: 20px 0 14px;
    color: var(--muted);
    font-size: .94rem;
}
.product-page { padding-top: 6px; }
.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr);
    gap: 22px;
}
.gallery-main-wrap {
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff, #eef4ff);
    border: 1px solid rgba(155, 190, 235, 0.22);
}
.gallery-main {
    width: 100%;
    min-height: 520px;
    object-fit: cover;
}
.thumb-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.thumb-button {
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid transparent;
    background: transparent;
    cursor: pointer;
}
.thumb-button img { width: 100%; height: 92px; object-fit: cover; }
.thumb-button.active { border-color: rgba(74, 149, 255, 0.55); }
.product-media-frame { margin-top: 16px; min-height: 280px; }
.product-page-topline { margin-bottom: 6px; }
.rich-spec-list {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}
.rich-spec-list > div {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(74, 149, 255, 0.06);
    color: var(--text-2);
}

.cart-page { padding-top: 14px; }
.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr);
    gap: 22px;
}
.cart-list { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr) 150px;
    gap: 16px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(155, 190, 235, 0.18);
}
.cart-item-image {
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff, #edf4ff);
}
.cart-item-image img { width: 100%; height: 100%; min-height: 116px; object-fit: cover; }
.cart-item-info { display: flex; flex-direction: column; gap: 8px; }
.cart-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.qty-input { width: 92px; }
.checkout-form { display: flex; flex-direction: column; gap: 14px; }
.empty-state { text-align: center; }

.admin-body {
    background: linear-gradient(180deg, #f6faff 0%, #eef5ff 100%);
}
.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
}
.admin-sidebar {
    padding: 22px;
    border-right: 1px solid rgba(155, 190, 235, 0.18);
    background: rgba(248, 251, 255, 0.92);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.admin-brand img {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: var(--shadow-1), var(--shadow-2);
}
.admin-brand small { display: block; margin-top: 4px; color: var(--muted); }
.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-nav a {
    padding: 14px 16px;
    border-radius: 18px;
    color: var(--text-2);
    border: 1px solid transparent;
}
.admin-nav a.active,
.admin-nav a:hover {
    background: linear-gradient(145deg, #ffffff, #e7f1ff);
    border-color: rgba(155, 190, 235, 0.24);
}
.admin-sidebar-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.admin-main {
    padding: 24px;
}
.admin-topbar {
    margin-bottom: 16px;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.secondary-grid { margin-top: 18px; }
.stat-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-card-link h2,
.nested-panel h2 { margin: 0 0 10px; }
.admin-toolbar {
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.filters-row {
    display: grid;
    grid-template-columns: minmax(280px, 1.6fr) repeat(2, minmax(180px, .7fr)) auto;
    gap: 12px;
    margin-bottom: 16px;
}
.table-wrap {
    overflow: auto;
    border-radius: 20px;
    border: 1px solid rgba(155, 190, 235, 0.18);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
    background: rgba(255,255,255,0.45);
}
.admin-table th,
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(155, 190, 235, 0.16);
    text-align: left;
    vertical-align: top;
}
.admin-table th {
    font-size: .84rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    background: rgba(243, 248, 255, 0.95);
}
.table-media-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.table-media-cell img {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    object-fit: cover;
}
.compact-actions { gap: 8px; }
.inline-status-form { margin: 0; }
.status-select { min-width: 160px; }
.empty-cell { text-align: center; color: var(--muted); }
.narrow-section { max-width: 620px; }
.top-space-form { margin-top: 18px; }

.admin-login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.admin-login-card {
    width: min(460px, 100%);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.admin-login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.admin-login-brand img {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    object-fit: cover;
}
.admin-login-brand span { display: block; margin-top: 4px; color: var(--muted); }

@media (max-width: 1180px) {
    .products-grid,
    .dashboard-grid { grid-template-columns: 1fr; }
    .storefront-card { grid-template-columns: 1fr; }
    .product-layout,
    .cart-layout,
    .hero-grid { grid-template-columns: 1fr; }
    .hero-collage-main { min-height: 340px; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(155, 190, 235, 0.18);
    }
}

@media (max-width: 900px) {
    .form-grid,
    .compact-grid,
    .two-column-grid,
    .filters-row { grid-template-columns: 1fr; }
    .hero-collage { grid-template-columns: 1fr; }
    .hero-collage-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section-head,
    .footer-inner,
    .header-inner,
    .split-toolbar { align-items: flex-start; }
    .cart-item { grid-template-columns: 92px minmax(0, 1fr); }
    .cart-item-side {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .thumb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    body { font-size: 15px; }
    .container { width: min(100%, calc(100% - 20px)); }
    .header-inner {
        min-height: auto;
        padding: 14px 0;
        flex-direction: column;
        align-items: stretch;
    }
    .brand { align-items: center; }
    .header-actions { width: 100%; }
    .ghost-link,
    .cart-link,
    .button-primary,
    .button-secondary,
    .button-danger,
    .button-disabled { width: 100%; }
    .hero-copy,
    .hero-stage,
    .product-card,
    .gallery-panel,
    .product-info-panel,
    .cart-items-panel,
    .checkout-panel,
    .empty-state,
    .admin-section,
    .admin-login-card,
    .stat-box,
    .admin-card-link { padding: 18px; }
    .hero-buttons,
    .admin-action-row,
    .product-actions,
    .row-actions { flex-direction: column; align-items: stretch; }
    .hero-note-list { flex-direction: column; }
    .hero-collage-side { grid-template-columns: 1fr; }
    .hero-video { min-height: 240px; }
    .gallery-main { min-height: 320px; }
    .thumb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cart-item { grid-template-columns: 1fr; }
    .cart-item-image img { min-height: 220px; }
    .cart-item-side,
    .product-topline,
    .price-row,
    .detail-price-row,
    .checkout-summary,
    .section-head,
    .footer-inner { flex-direction: column; align-items: stretch; }
    .product-category,
    .stock-badge { width: fit-content; }
    .admin-main { padding: 16px; }
    .admin-sidebar { padding: 16px; }
}
