:root {
    --bg: #f8f6f2;
    --surface: #ffffff;
    --surface-2: #f2ede6;
    --text: #1f1f1f;
    --muted: #7a746b;
    --line: #e7e0d7;
    --brand: #3d342b;
    --brand-2: #5a4d40;
    --accent: #b89562;
    --danger-soft: #fff1f1;
    --danger-text: #a94442;
    --success-soft: #eef7f0;
    --success-text: #2f5d3a;
    --shadow: 0 10px 30px rgba(31, 31, 31, 0.06);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

html {
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.main-shell {
    min-height: calc(100vh - 90px);
}

.container,
.container-fluid {
    position: relative;
}

/* Navbar */
.premium-navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(31, 31, 31, 0.04);
    padding-top: 10px;
    padding-bottom: 10px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

    .brand-logo img,
    .site-logo {
        height: 72px !important;
        width: auto !important;
        max-width: 220px !important;
        object-fit: contain !important;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: block;
    }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.08;
}

.brand-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--brand);
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--muted);
}

.premium-link {
    color: var(--text) !important;
    font-weight: 600;
    padding: 10px 14px !important;
    border-radius: 999px;
    transition: 0.2s ease;
}

    .premium-link:hover {
        background: var(--surface-2);
        color: var(--brand) !important;
    }

.admin-link {
    color: var(--brand) !important;
    font-weight: 700;
}

/* Sections */
.section-head {
    margin-bottom: 24px;
}

.section-kicker,
.hero-badge,
.product-category-tag {
    display: inline-flex;
    align-items: center;
    background: var(--surface-2);
    color: var(--brand);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
}

.section-title,
.hero-title,
.details-title {
    color: var(--brand);
    font-weight: 800;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-top: 10px;
}

.section-text,
.hero-text {
    color: var(--muted);
}

/* Hero */
.hero-soft {
    background: linear-gradient(180deg, #ffffff 0%, #fbfaf8 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 42px;
    box-shadow: var(--shadow);
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.12;
    margin: 0;
}

.hero-visual {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-logo {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
}

.hero-card-mini {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 18px;
    box-shadow: var(--shadow);
    top: 20px;
    right: 20px;
}

    .hero-card-mini.second {
        top: auto;
        right: auto;
        left: 20px;
        bottom: 20px;
    }

    .hero-card-mini span {
        display: block;
        font-size: 0.82rem;
        color: var(--muted);
    }

    .hero-card-mini strong {
        color: var(--brand);
    }

/* Panels */
.soft-panel,
.product-details-soft,
.details-image-box,
.category-premium-inner,
.product-premium-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.soft-panel {
    border-radius: var(--radius-lg);
    padding: 22px;
}

.product-details-soft {
    border-radius: var(--radius-xl);
    padding: 28px;
}

.details-image-box {
    border-radius: var(--radius-lg);
    padding: 14px;
}

    .details-image-box img,
    .details-image-soft {
        width: 100%;
        max-height: 430px;
        object-fit: contain;
        border-radius: 16px;
        display: block;
        background: #fff;
    }

.details-content {
    padding: 4px 6px;
}

.details-divider {
    height: 1px;
    background: var(--line);
    margin: 22px 0;
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #fbfaf8;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 16px;
}

    .details-row span {
        color: var(--muted);
        font-weight: 500;
    }

    .details-row strong {
        color: var(--text);
        font-weight: 700;
    }

    .details-row.admin {
        background: var(--danger-soft);
        color: var(--danger-text);
    }

.admin-price {
    color: var(--danger-text);
    font-weight: 700;
}

/* Category cards */
.category-premium-inner {
    border-radius: 22px;
    padding: 28px 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .category-premium-inner:hover {
        transform: translateY(-4px);
    }

.category-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: var(--brand);
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.2rem;
}

.category-premium-inner h5 {
    margin-bottom: 8px;
    color: var(--brand);
    font-weight: 700;
}

.category-premium-inner span {
    color: var(--muted);
}

/* Inputs */
.form-control,
.form-select,
.premium-input {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    min-height: 52px;
    color: var(--text);
    box-shadow: none !important;
}

    .form-control:focus,
    .form-select:focus,
    .premium-input:focus {
        border-color: #cbb79d;
        box-shadow: 0 0 0 0.18rem rgba(184, 149, 98, 0.12) !important;
    }

/* Buttons */
.btn,
button {
    border-radius: 16px !important;
}

.btn-premium,
.btn-soft-outline,
.btn-soft-success,
.btn-soft-danger,
.btn-neutral {
    padding: 12px 18px;
    font-weight: 700;
    transition: 0.2s ease;
    border: none;
}

.btn-premium-lg {
    padding: 14px 24px;
    border-radius: 18px !important;
}

.btn-premium {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff !important;
}

    .btn-premium:hover {
        opacity: 0.96;
        color: #fff !important;
    }

.btn-soft-outline {
    background: #fff;
    color: var(--brand) !important;
    border: 1px solid var(--line);
}

    .btn-soft-outline:hover {
        background: var(--surface-2);
    }

.btn-soft-success {
    background: var(--success-soft);
    color: var(--success-text) !important;
    border: 1px solid #d8eadc;
}

.btn-soft-danger {
    background: #fdf1f1;
    color: #9f3f3f !important;
    border: 1px solid #f0d8d8;
}

.btn-neutral {
    background: var(--surface-2);
    color: var(--brand) !important;
    border: 1px solid var(--line);
}

/* Chips */
.chip-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    border: 1px solid var(--line);
    font-weight: 600;
}

.chip-soft-active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* Product cards */
.product-premium-card {
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

    .product-premium-card:hover {
        transform: translateY(-5px);
    }

.product-image-wrap {
    background: #faf8f5;
}

.product-premium-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.product-image-empty {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: #faf8f5;
    border-radius: 16px;
}

.product-premium-body {
    padding: 20px;
}

.product-name {
    margin-top: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand);
    min-height: 52px;
}

.product-price {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--accent);
}

/* Empty states */
.empty-soft {
    background: var(--surface);
    border: 1px dashed #d7cec2;
    border-radius: 20px;
    padding: 26px;
    text-align: center;
    color: var(--muted);
    box-shadow: var(--shadow);
}

.scanner-video {
    width: 100%;
    max-width: 420px;
    border-radius: 18px;
    background: #000;
}

/* Admin products - compact cards */
.admin-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.admin-product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: center;
}

/* IMAGE */
.admin-product-image-side {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
}

.admin-product-cover,
.admin-product-cover-empty {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.admin-product-cover {
    object-fit: contain;
    background: #fff;
    padding: 6px;
}

.admin-product-cover-empty {
    font-size: 11px;
    text-align: center;
    color: #8b7d6b;
    background: #f8f5f1;
}

/* CONTENT */
.admin-product-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* TOP */
.admin-product-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-category-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 700;
}

.admin-product-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--brand);
    margin: 0;
}

/* PRICES + BARCODE */
.admin-prices-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.admin-info-box,
.admin-barcode-box {
    background: #fbfaf8;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 7px 10px;
    min-width: 95px;
    text-align: center;
}

    .admin-info-box span,
    .admin-barcode-box span {
        display: block;
        color: var(--muted);
        font-size: 0.7rem;
    }

    .admin-info-box strong {
        font-size: 0.85rem;
        font-weight: 800;
        color: #8b5e3c;
    }

    .admin-info-box.sell strong {
        color: var(--accent);
    }

    .admin-barcode-box strong {
        font-size: 0.8rem;
        word-break: break-all;
    }

/* DIVIDER */
.admin-product-divider {
    height: 1px;
    background: var(--line);
    margin: 10px 0;
}

/* ACTIONS */
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

    .admin-actions .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

/* IMAGE BOX (EDIT PAGE) */
.admin-image-box {
    background: #fbfaf8;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    display: inline-block;
}

.admin-edit-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.admin-thumb-empty.large {
    width: 120px;
    height: 120px;
    border-radius: 14px;
    background: #faf8f5;
    border: 1px dashed var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-soft {
        padding: 26px;
    }

    .brand-subtitle {
        display: none;
    }

    .hero-visual {
        min-height: 270px;
    }

    .product-premium-image,
    .product-image-empty {
        height: 180px;
    }

    .admin-product-card {
        grid-template-columns: 58px 1fr;
        gap: 10px;
        padding: 10px 12px;
        align-items: start;
    }

    .admin-product-image-side {
        width: 58px;
        justify-content: center;
        align-items: flex-start;
        padding-top: 4px;
    }

    .admin-product-cover,
    .admin-product-cover-empty {
        width: 58px;
        height: 58px;
        border-radius: 12px;
        padding: 4px;
        font-size: 10px;
    }

    .admin-product-content {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .admin-product-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
        flex-wrap: wrap;
    }

    .admin-category-pill {
        font-size: 0.68rem;
        padding: 5px 8px;
        margin-bottom: 4px;
    }

    .admin-product-title {
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .admin-product-divider {
        margin: 8px 0;
    }

    .admin-prices-row {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 8px;
    }

    .admin-info-box,
    .admin-barcode-box {
        min-width: 84px;
        padding: 6px 8px;
        border-radius: 10px;
    }

        .admin-info-box span,
        .admin-barcode-box span {
            font-size: 0.65rem;
            margin-bottom: 2px;
        }

        .admin-info-box strong,
        .admin-barcode-box strong {
            font-size: 0.78rem;
        }

    .admin-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

        .admin-actions .btn {
            padding: 6px 9px;
            font-size: 0.7rem;
        }
}