:root {
    --color-primary: #1672c9;
    --color-primary-dark: #0d4f87;
    --color-accent: #eef8ff;
    --color-text: #12324d;
    --color-muted: #60758b;
    --color-surface: #ffffff;
    --color-background: #eef6fb;
    --color-border: #d5e3ef;
    --color-success: #1a8a52;
    --color-warning: #9a6a06;
    --shadow-soft: 0 22px 50px rgba(19, 83, 136, 0.12);
    --shadow-card: 0 14px 28px rgba(17, 73, 118, 0.1);
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--color-text);
    background:
        radial-gradient(circle at top left, rgba(112, 197, 255, 0.28), transparent 28%),
        radial-gradient(circle at top right, rgba(215, 244, 255, 0.85), transparent 22%),
        linear-gradient(180deg, #f8fcff 0%, var(--color-background) 100%);
    min-height: 100vh;
}

a {
    color: inherit;
}

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

.site-header,
.site-footer {
    padding: 16px 20px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(248, 252, 255, 0.72);
    border-bottom: 1px solid rgba(213, 227, 239, 0.7);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.92), transparent 25%),
        linear-gradient(135deg, var(--color-primary) 0%, #64c7ff 100%);
    box-shadow: var(--shadow-card);
}

.brand-copy strong,
.brand-copy span {
    display: block;
}

.brand-copy span {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.catalog-home {
    padding: 12px 20px 48px;
}

.hero-card {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 252, 255, 0.9) 100%);
    border: 1px solid rgba(215, 229, 242, 0.9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
}

.hero-text {
    margin: 14px 0 0;
    color: var(--color-muted);
    line-height: 1.7;
}

.catalog-hero {
    position: relative;
    overflow: hidden;
}

.catalog-hero::after {
    content: "";
    position: absolute;
    inset: auto -60px -70px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(89, 183, 255, 0.3) 0%, rgba(89, 183, 255, 0) 70%);
}

.catalog-hero::before {
    content: "";
    position: absolute;
    inset: 18px auto auto 18px;
    width: 84px;
    height: 84px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(223, 243, 255, 0.95) 0%, rgba(255, 255, 255, 0.2) 100%);
    opacity: 0.7;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(144, 203, 241, 0.6);
    color: var(--color-primary-dark);
    font-size: 0.84rem;
    font-weight: 700;
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 22px;
}

.status-item {
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.status-label {
    display: block;
    margin-bottom: 6px;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.notice {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.notice-success {
    background: rgba(26, 138, 82, 0.1);
    color: var(--color-success);
}

.notice-warning {
    background: rgba(154, 106, 6, 0.1);
    color: var(--color-warning);
}

.filter-panel,
.catalog-results {
    max-width: 980px;
    margin: 18px auto 0;
}

.catalog-filter-form {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(215, 229, 242, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.field-group {
    display: block;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.95rem;
}

.field-control {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    color: var(--color-text);
    font-size: 1rem;
}

.field-control:focus {
    outline: 2px solid rgba(15, 111, 198, 0.18);
    border-color: var(--color-primary);
}

.filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button {
    border: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, #33b0ff 100%);
    color: #fff;
    box-shadow: 0 16px 30px rgba(15, 111, 198, 0.24);
    cursor: pointer;
}

.secondary-button {
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.88);
    color: var(--color-text);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
}

.product-grid {
    display: grid;
    gap: 16px;
}

.product-card {
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 252, 255, 0.94) 100%);
    border: 1px solid rgba(215, 229, 242, 0.95);
    border-radius: 26px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 34px rgba(17, 73, 118, 0.14);
}

.product-image-wrap {
    aspect-ratio: 4 / 3;
    background: #ffffff;
    padding: 12px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-weight: 700;
}

.product-card-body {
    padding: 18px;
}

.product-card-footer {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.product-cta-note {
    color: var(--color-primary-dark);
    font-size: 0.88rem;
    font-weight: 700;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.product-code,
.product-category {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.82rem;
}

.product-code {
    background: rgba(15, 111, 198, 0.1);
    color: var(--color-primary-dark);
}

.product-category {
    background: rgba(21, 49, 75, 0.08);
    color: var(--color-text);
}

.product-title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.35;
}

.product-description {
    margin: 12px 0 18px;
    color: var(--color-muted);
    line-height: 1.7;
}

.product-link {
    width: 100%;
}

.detail-shell {
    max-width: 980px;
    margin: 0 auto;
}

.admin-auth-shell {
    max-width: 560px;
    margin: 0 auto;
}

.admin-auth-card {
    padding: 26px 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 252, 255, 0.94) 100%);
    border: 1px solid rgba(215, 229, 242, 0.95);
    border-radius: 26px;
    box-shadow: var(--shadow-card);
}

.admin-auth-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.admin-auth-form .primary-button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}

.admin-dashboard-panel {
    max-width: 980px;
    margin: 18px auto 0;
}

.admin-form-wrap,
.admin-table-wrap {
    max-width: 980px;
    margin: 18px auto 0;
}

.admin-form-card,
.admin-table-card {
    padding: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 252, 255, 0.94) 100%);
    border: 1px solid rgba(215, 229, 242, 0.95);
    border-radius: 26px;
    box-shadow: var(--shadow-card);
}

.admin-form-grid {
    display: grid;
    gap: 16px;
}

.field-control-textarea {
    min-height: 130px;
    padding-top: 12px;
    padding-bottom: 12px;
    resize: vertical;
}

.field-control-file {
    padding-top: 12px;
    padding-bottom: 12px;
}

.field-help {
    display: block;
    margin-top: 8px;
    color: var(--color-muted);
}

.admin-current-image {
    margin-bottom: 18px;
}

.admin-current-image img {
    width: 100%;
    max-width: 280px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
}

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

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

.admin-table th {
    color: var(--color-muted);
    font-size: 0.9rem;
    background: rgba(239, 248, 255, 0.55);
}

.admin-product-cell {
    display: flex;
    gap: 12px;
}

.admin-product-thumb {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-size: 0.8rem;
    text-align: center;
}

.admin-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

.admin-inline-meta {
    display: block;
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.admin-inline-form {
    margin: 0;
}

.status-pill {
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.status-active {
    background: rgba(26, 138, 82, 0.14);
    color: var(--color-success);
}

.status-inactive {
    background: rgba(154, 106, 6, 0.14);
    color: var(--color-warning);
}

.admin-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-small-button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.92rem;
}

.admin-danger-button {
    border-color: rgba(184, 40, 40, 0.25);
    color: #ab2d2d;
}

.admin-danger-fill {
    background: linear-gradient(135deg, #d34646 0%, #ed6a5e 100%);
}

.detail-card,
.detail-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 252, 255, 0.94) 100%);
    border: 1px solid rgba(215, 229, 242, 0.95);
    border-radius: 26px;
    box-shadow: var(--shadow-card);
}

.detail-card {
    overflow: hidden;
}

.detail-visual {
    background: #ffffff;
    padding: 16px;
}

.detail-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    object-position: center center;
}

.detail-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-weight: 700;
}

.detail-content {
    padding: 22px 20px;
}

.detail-title {
    margin: 8px 0 0;
    font-size: 1.85rem;
    line-height: 1.2;
}

.detail-summary {
    margin: 14px 0 0;
    color: var(--color-muted);
    line-height: 1.7;
    font-size: 1rem;
}

.detail-highlight-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
}

.detail-highlight-item {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(227, 245, 255, 0.65);
    border: 1px solid rgba(159, 217, 255, 0.5);
}

.detail-highlight-item span,
.detail-highlight-item strong {
    display: block;
}

.detail-highlight-item span {
    margin-bottom: 6px;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.detail-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
}

.detail-section {
    margin-top: 16px;
    padding: 22px 20px;
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 1.2rem;
}

.section-kicker {
    margin: 0 0 8px;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-copy {
    color: var(--color-text);
    line-height: 1.8;
    white-space: normal;
}

.empty-state {
    padding: 34px 22px;
    text-align: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px dashed var(--color-border);
    border-radius: 24px;
    color: var(--color-muted);
}

.empty-state h2 {
    margin: 0 0 10px;
    color: var(--color-text);
    font-size: 1.4rem;
}

.empty-state p {
    margin: 0;
    line-height: 1.7;
}

.site-footer {
    color: var(--color-muted);
    text-align: center;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .site-header,
    .catalog-home,
    .site-footer {
        padding-left: 32px;
        padding-right: 32px;
    }

    .status-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .catalog-filter-form {
        grid-template-columns: 2fr 1fr auto;
        align-items: end;
    }

    .filter-actions {
        grid-template-columns: 1fr 1fr;
        min-width: 240px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-highlight-bar {
        grid-template-columns: 1fr 1fr;
    }

    .detail-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .detail-image {
        aspect-ratio: auto;
        min-height: 100%;
    }

    .detail-content {
        padding: 28px;
    }

    .detail-section {
        padding: 24px 28px;
    }

    .detail-actions {
        grid-template-columns: 1fr 1fr;
    }

    .admin-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table th,
    .admin-table td,
    .admin-table tr {
        display: block;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tr {
        padding: 12px 0;
        border-bottom: 1px solid var(--color-border);
    }

    .admin-table td {
        border: 0;
        padding: 8px 0;
    }

    .admin-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: var(--color-muted);
        font-size: 0.85rem;
        font-weight: 700;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
