*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #0f1020;
    --bg-soft: #17182c;
    --card: #ffffff;
    --ink: #0f1222;
    --muted: #6c7287;
    --line: #e8eaf4;
    --primary: #7c4dff;
    --primary-2: #ff5db1;
    --accent: #14c6a4;
    --light: #f7f8fd;
    --danger: #ef4444;
    --success: #16a34a;
    --radius: 22px;
    --shadow: 0 18px 40px rgba(15, 18, 34, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 18, 34, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(124, 77, 255, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 93, 177, 0.14), transparent 24%),
        linear-gradient(180deg, #f7f8fd 0%, #eef1f9 100%);
    color: var(--ink);
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(18px);
    background: rgba(255,255,255,0.82);
    border-bottom: 1px solid rgba(232, 234, 244, 0.9);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 76px;
}

.brand {
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand span {
    color: var(--primary);
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav a {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    color: #2c3048;
    font-weight: 600;
}

.nav a:hover {
    background: #f1f2fa;
}

.hero {
    padding: 3.5rem 0 2rem;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
    background: linear-gradient(135deg, #12142a 0%, #1e2142 55%, #2b2f5f 100%);
    color: #fff;
    border-radius: 32px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero-card h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    margin: 0 0 1rem;
}

.hero-card p {
    color: rgba(255,255,255,0.82);
    max-width: 640px;
}

.badge {
    display: inline-flex;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.btn,
button,
input[type="submit"] {
    border: none;
    cursor: pointer;
    font: inherit;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.9rem 1.2rem;
    border-radius: 16px;
    font-weight: 700;
    transition: transform .2s ease, opacity .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
}

.btn-soft {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
}

.hero-visual {
    align-self: stretch;
    min-height: 280px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 20%),
        radial-gradient(circle at 70% 25%, rgba(20,198,164,0.35), transparent 16%),
        radial-gradient(circle at 70% 75%, rgba(255,93,177,0.28), transparent 18%),
        linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    position: relative;
    overflow: hidden;
}

.hero-visual::after {
    content: "JULS store";
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 900;
    color: rgba(255,255,255,0.18);
}

.section {
    padding: 1.5rem 0 3rem;
}

.section h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin: 0 0 1rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-head p {
    color: var(--muted);
    margin: 0;
}

.grid-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.card {
    background: var(--card);
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(232, 234, 244, 0.9);
}

.product-card .image-box {
    aspect-ratio: 1 / 1.08;
    background: #f0f3fb;
    overflow: hidden;
}

.product-card .image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .content {
    padding: 1rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin: 0.75rem 0 0;
}

.price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.muted {
    color: var(--muted);
}

.product-layout,
.checkout-layout,
.admin-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    padding: 2rem 0 3rem;
}

.gallery {
    display: grid;
    gap: 1rem;
}

.gallery-main {
    border-radius: 28px;
    overflow: hidden;
    background: #f0f3fb;
    min-height: 320px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 0.75rem;
}

.gallery-thumbs img {
    border-radius: 16px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 2px solid transparent;
}

.panel,
.form-card,
.cart-card,
.notice {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(232, 234, 244, 0.9);
    padding: 1.25rem;
}

form {
    display: grid;
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.45rem;
    font-weight: 600;
    color: #232744;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #d9def0;
    border-radius: 16px;
    padding: 0.92rem 1rem;
    background: #fff;
    outline: none;
    font: inherit;
}

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

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.12);
}

.two-cols,
.three-cols {
    display: grid;
    gap: 1rem;
}

.two-cols { grid-template-columns: repeat(2, 1fr); }
.three-cols { grid-template-columns: repeat(3, 1fr); }

.alert {
    border-radius: 18px;
    padding: 0.95rem 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fff0f0;
    color: #9f1239;
}

.alert-success {
    background: #eefcf2;
    color: #166534;
}

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

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

th,
td {
    text-align: left;
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.92rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cart-item img {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    object-fit: cover;
    background: #f0f3fb;
}

.summary-list {
    display: grid;
    gap: 0.75rem;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.summary-row.total {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
    font-size: 1.1rem;
    font-weight: 800;
}

.site-footer {
    background: #12142a;
    color: rgba(255,255,255,0.84);
    padding: 2.25rem 0;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.small {
    font-size: 0.92rem;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.kpi {
    padding: 1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, #fafaff, #f3f5fd);
    border: 1px solid var(--line);
}

.login-box {
    max-width: 460px;
    margin: 3rem auto;
}

.inline {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.tag-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tag {
    border-radius: 999px;
    padding: 0.5rem 0.8rem;
    background: #f1f2fb;
    color: #3d4262;
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 980px) {
    .hero-card,
    .product-layout,
    .checkout-layout,
    .admin-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .kpis {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-wrap {
        min-height: auto;
        padding: 1rem 0;
        flex-direction: column;
        align-items: stretch;
    }

    .nav {
        justify-content: center;
    }

    .grid-products {
        grid-template-columns: 1fr;
    }

    .two-cols,
    .three-cols {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 1.5rem;
    }

    .hero-card {
        padding: 1.35rem;
        border-radius: 24px;
    }

    .panel,
    .form-card,
    .cart-card {
        padding: 1rem;
        border-radius: 20px;
    }
}
