:root {
    --on-primary-fixed: #001f28;
    --primary: #00647c;
    --primary-hover: #007f9d;
    --primary-soft: #b7eaff;
    --primary-soft-dim: #6cd3f7;

    --secondary: #585e73;
    --secondary-container: #dce1fb;

    --background: #f7f9fb;
    --surface: #ffffff;
    --surface-soft: #f2f4f6;
    --surface-container: #eceef0;
    --surface-container-low: #f7f9fb;
    --surface-container-high: #e6e8ea;

    --text: #191c1e;
    --text-muted: #3e484d;
    --text-soft: #6e797e;
    --outline: #bdc8ce;
    --outline-strong: #6e797e;

    --hero-dark: #020617;
    --footer-dark: #001f28;

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    --container: 1280px;
    --gutter: 24px;

    --shadow-sm: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.14);
    --shadow-hero: 0 24px 60px rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 72px;
    background: rgba(247, 249, 251, 0.86);
    border-bottom: 1px solid var(--outline);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(14px);
}

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

.brand-link {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    height: 42px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 100, 124, 0.22);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 12px 24px rgba(0, 100, 124, 0.28);
}

.btn-outline {
    background: #ffffff;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: rgba(108, 211, 247, 0.1);
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(
            90deg,
            rgba(2, 6, 23, 0.74) 0%,
            rgba(2, 6, 23, 0.62) 45%,
            rgba(2, 6, 23, 0.52) 100%
        ),
        url('/storage/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 480px);
    gap: 64px;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 128px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    background: rgba(108, 211, 247, 0.1);
    border: 1px solid rgba(108, 211, 247, 0.22);
    color: var(--primary-soft-dim);
    font-size: 12px;
    line-height: 16px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    max-width: 720px;
    margin: 32px 0 0;
    color: #ffffff;
    font-size: clamp(42px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.hero-title::first-letter {
    letter-spacing: -0.06em;
}

.hero-description {
    max-width: 680px;
    margin: 26px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 18px;
    line-height: 1.65;
    font-weight: 400;
}

.search-panel {
    width: 100%;
    max-width: 760px;
    margin-top: 34px;
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px auto;
    gap: 16px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hero);
}

.search-control {
    width: 100%;
    min-height: 56px;
    border: 0;
    outline: 0;
    border-radius: var(--radius-md);
    background: var(--surface-container-low);
    color: var(--text);
    padding: 0 18px;
    font-size: 15px;
    line-height: 24px;
}

.search-control::placeholder {
    color: var(--outline-strong);
}

.search-control:focus {
    box-shadow: 0 0 0 3px rgba(108, 211, 247, 0.45);
}

/* Stats */
.stats-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    min-height: 166px;
    padding: 30px;
    background: #ffffff;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-label {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
}

.stat-value {
    margin-top: 10px;
    color: var(--text);
    font-size: 36px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.stat-note {
    margin-top: 10px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 20px;
}

/* Sections */
.section {
    padding-top: 64px;
    padding-bottom: 64px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 48px;
}

.section-title {
    margin: 0;
    color: var(--text);
    font-size: 34px;
    line-height: 42px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-description {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 24px;
}

.section-pill {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-full);
    background: rgba(108, 211, 247, 0.16);
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-media {
    position: relative;
    height: 256px;
    overflow: hidden;
    background: linear-gradient(135deg, #b7eaff, #e0e3e5);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(108, 211, 247, 0.45), transparent 40%),
        linear-gradient(135deg, #e0f7ff, #f7f9fb);
}

.product-placeholder-box {
    min-width: 132px;
    padding: 24px;
    text-align: center;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-md);
}

.product-initial {
    color: var(--primary);
    font-size: 46px;
    line-height: 1;
    font-weight: 900;
}

.product-placeholder-name {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 800;
}

.product-badge {
    position: absolute;
    top: 16px;
    z-index: 2;
    padding: 7px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    line-height: 16px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

.product-badge-left {
    left: 16px;
    background: var(--on-primary-fixed);
    color: var(--primary-soft-dim);
}

.product-badge-right {
    right: 16px;
    background: var(--primary);
    color: #ffffff;
}

.product-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.product-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 8px;
}

.product-name {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    line-height: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.product-condition {
    display: inline-flex;
    margin: 8px 0 0;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--secondary-container);
    color: #5e6479;
    font-size: 10px;
    line-height: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.price-box {
    flex: 0 0 auto;
    text-align: right;
}

.price-label {
    color: var(--outline-strong);
    font-size: 12px;
    font-weight: 700;
}

.price-value {
    margin-top: 4px;
    color: var(--primary);
    font-size: 24px;
    line-height: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.product-meta {
    margin-top: 20px;
    margin-bottom: 24px;
    padding: 18px;
    display: grid;
    gap: 13px;
    background: var(--surface-container-low);
    border-radius: var(--radius-md);
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--outline-strong);
    font-size: 12px;
    line-height: 16px;
}

.meta-row + .meta-row {
    padding-top: 12px;
    border-top: 1px solid var(--outline);
}

.meta-label {
    color: var(--outline-strong);
}

.meta-value {
    color: var(--text);
    font-weight: 900;
    text-align: right;
}

.product-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.product-details > div {
    min-width: 0;
}

.detail-label {
    display: block;
    color: var(--outline-strong);
    font-weight: 500;
}

.product-details div {
    font-weight: 700;
    color: var(--text);
}

.product-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-actions .btn {
    width: 100%;
    border-radius: var(--radius-md);
    min-height: 52px;
}

/* Empty */
.empty-state {
    grid-column: 1 / -1;
    padding: 64px 24px;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-icon {
    font-size: 48px;
}

.empty-title {
    margin: 18px 0 0;
    color: var(--text);
    font-size: 24px;
    line-height: 32px;
    font-weight: 900;
}

.empty-description {
    max-width: 620px;
    margin: 12px auto 0;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.7;
}

/* Info */
.info-section {
    background: var(--surface);
    padding-top: 64px;
    padding-bottom: 64px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.info-card {
    padding: 40px;
    background: #ffffff;
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.info-title {
    color: var(--text);
    font-size: 24px;
    line-height: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.info-text {
    margin: 16px 0 0;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.75;
}

/* Footer */
.site-footer {
    background: var(--footer-dark);
    color: rgba(255, 255, 255, 0.72);
    padding-top: 48px;
    padding-bottom: 32px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

/* Responsive */
@media (max-width: 1100px) {
    .hero-inner {
        grid-template-columns: 1fr;
        padding-bottom: 80px;
    }

    .stats-grid {
        max-width: 640px;
    }

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

@media (max-width: 820px) {
    .site-header,
    .header-inner {
        height: auto;
        min-height: 72px;
    }

    .header-inner {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .brand-logo {
        height: 36px;
        max-width: 190px;
    }

    .header-actions {
        gap: 8px;
    }

    .btn {
        min-height: 40px;
        padding: 0 16px;
        font-size: 13px;
    }

    .hero-inner {
        padding-top: 48px;
        padding-bottom: 56px;
        gap: 40px;
    }

    .hero-title {
        margin-top: 24px;
        font-size: 42px;
        line-height: 1.08;
    }

    .hero-description {
        font-size: 16px;
    }

    .search-panel {
        grid-template-columns: 1fr;
        border-radius: var(--radius-lg);
    }

    .stats-grid,
    .product-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: auto;
    }

    .section-header,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-top {
        flex-direction: column;
    }

    .price-box {
        text-align: left;
    }

    .product-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

    .header-inner {
        gap: 12px;
    }

    .brand-logo {
        max-width: 150px;
    }

    .hero-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 28px;
        line-height: 36px;
    }

    .product-media {
        height: 220px;
    }

    .info-card {
        padding: 28px;
    }
}

.product-top-stacked {
    display: block;
}

.price-box-under-title {
    margin-top: 10px;
    text-align: left;
}

.price-box-under-title .price-label {
    margin-bottom: 2px;
}

.price-box-under-title + .product-condition {
    margin-top: 10px;
}
