﻿* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: #f5f7fb;
    color: #172033;
}

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

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

.container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

.site-header,
.admin-header {
    background: #ffffff;
    border-bottom: 1px solid #e6e9ef;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.logo {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo span,
.login-logo span {
    color: #635bff;
}

.main-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.main-nav a {
    font-weight: 700;
    color: #596275;
}

.main-nav a:hover {
    color: #635bff;
}

.hero {
    min-height: 510px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(99, 91, 255, .20),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #111827,
            #202a44
        );
    color: white;
}

.hero-content {
    padding: 80px 0;
}

.badge,
.eyebrow {
    display: inline-block;
    color: #7c75ff;
    font-weight: 900;
    letter-spacing: 2px;
    font-size: 12px;
}

.hero .badge {
    color: #a8a3ff;
}

.hero h1 {
    font-size: clamp(42px, 7vw, 76px);
    line-height: .98;
    max-width: 780px;
    margin: 18px 0;
    letter-spacing: -4px;
}

.hero p {
    max-width: 650px;
    color: #cbd2e1;
    font-size: 19px;
    line-height: 1.7;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 13px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s;
}

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

.btn-primary {
    background: #635bff;
    color: white;
}

.btn-secondary {
    background: #172033;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-small {
    padding: 8px 12px;
    font-size: 13px;
    background: #edf0f5;
}

.btn-full {
    width: 100%;
}

.store-section {
    padding: 80px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 35px;
}

.section-heading h2 {
    font-size: 38px;
    margin: 7px 0 0;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-list a {
    padding: 9px 14px;
    background: white;
    border: 1px solid #e4e7ed;
    border-radius: 999px;
    font-weight: 700;
}

.category-list a.active {
    background: #635bff;
    color: white;
}

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

.product-card {
    overflow: hidden;
    border-radius: 18px;
    background: white;
    border: 1px solid #e7eaf0;
    box-shadow: 0 12px 35px rgba(17, 24, 39, .06);
}

.product-image {
    aspect-ratio: 16 / 10;
    background: #edf0f5;
    overflow: hidden;
}

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

.no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9299a8;
    font-weight: 900;
}

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

.product-category {
    color: #635bff;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-card h3 {
    margin: 8px 0;
    font-size: 22px;
}

.product-description {
    color: #6b7280;
    line-height: 1.6;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

.price,
.detail-price {
    font-size: 26px;
    font-weight: 900;
}

.site-footer {
    background: #111827;
    color: white;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 50px;
    padding-bottom: 50px;
}

.footer-grid p {
    color: #aeb7c8;
    line-height: 1.7;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #cdd4e0;
}

.footer-bottom {
    border-top: 1px solid #273247;
    text-align: center;
    padding: 22px;
    color: #8993a7;
}

.product-detail {
    padding: 70px 0;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);
    gap: 60px;
}

.product-detail-image {
    background: white;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid #e5e8ef;
}

.product-detail-image img {
    width: 100%;
}

.product-detail-content h1 {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -2px;
}

.sku {
    margin-top: 8px;
    color: #8b93a4;
    font-size: 13px;
    font-weight: 800;
}

.long-description {
    color: #626b7c;
    line-height: 1.9;
    white-space: normal;
}

.purchase-box {
    margin-top: 35px;
    background: white;
    padding: 25px;
    border: 1px solid #e4e7ed;
    border-radius: 18px;
}

#paypal-button-container {
    margin-top: 20px;
}

.payment-success {
    margin-top: 20px;
    padding: 20px;
    background: #ecfdf5;
    border-radius: 12px;
    color: #065f46;
}

.payment-error {
    margin-top: 20px;
    padding: 20px;
    background: #fef2f2;
    border-radius: 12px;
    color: #991b1b;
}

.payment-loading {
    margin-top: 20px;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 12px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        linear-gradient(
            135deg,
            #111827,
            #312e81
        );
    padding: 25px;
}

.login-box {
    width: min(450px, 100%);
    background: white;
    padding: 38px;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
}

.login-logo {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 25px;
}

.login-box h1 {
    margin-bottom: 25px;
}

label {
    display: block;
    margin: 18px 0 8px;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #dfe3ea;
    background: #fff;
    border-radius: 11px;
    padding: 13px 14px;
    font: inherit;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #635bff;
    box-shadow: 0 0 0 3px rgba(99, 91, 255, .10);
}

.back-link {
    display: block;
    margin-top: 20px;
    color: #635bff;
    font-weight: 800;
}

.admin-container {
    padding: 50px 0 80px;
}

.admin-title {
    margin-bottom: 35px;
}

.admin-title h1 {
    font-size: 45px;
    margin: 5px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border: 1px solid #e3e7ee;
    border-radius: 18px;
    padding: 25px;
}

.stat-card span {
    display: block;
    color: #7a8497;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    font-size: 30px;
    margin-top: 10px;
}

.admin-grid {
    display: grid;
    grid-template-columns:
        1.5fr
        1fr;
    gap: 25px;
}

.admin-card {
    background: white;
    border: 1px solid #e2e6ed;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 25px;
}

.admin-card h2 {
    margin-top: 0;
}

.admin-card hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 30px 0;
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 700;
}

.alert.success {
    background: #ecfdf5;
    color: #047857;
}

.alert.error {
    background: #fef2f2;
    color: #b91c1c;
}

.category-admin-list > div {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f4;
}

.category-admin-list small {
    color: #8992a2;
}

.admin-products {
    display: grid;
    gap: 12px;
}

.admin-product {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border: 1px solid #e7eaf0;
    border-radius: 14px;
}

.admin-product img {
    width: 70px;
    height: 55px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.admin-product-info span {
    color: #7d8798;
    font-size: 13px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 60px;
    text-align: center;
    background: white;
    border-radius: 18px;
}

@media (max-width: 900px) {

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

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

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

}

@media (max-width: 650px) {

    .container {
        width: min(
            100% - 24px,
            1180px
        );
    }

    .header-inner {
        min-height: 65px;
    }

    .main-nav {
        gap: 12px;
        font-size: 13px;
    }

    .hero {
        min-height: 450px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

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

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .admin-product {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .admin-product-info {
        min-width: calc(100% - 100px);
    }

}
