/* ─── PowerBank Store — main stylesheet ─── */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #f59e0b;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark);
    background: var(--light);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ─── Header ─── */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}
.header__logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.header__logo span { color: var(--primary); }
.header__nav { display: flex; gap: 24px; align-items: center; }
.header__nav a { color: var(--gray); font-weight: 500; transition: color .2s; }
.header__nav a:hover { color: var(--primary); }

.header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.header__burger span {
    width: 24px; height: 2px;
    background: var(--dark);
    transition: .3s;
}

@media (max-width: 768px) {
    .header__burger { display: flex; }
    .header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    .header__nav.active { display: flex; }
}

/* ─── Hero ─── */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 64px 0;
    text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 16px; font-weight: 800; }
.hero p { font-size: 1.2rem; opacity: .9; max-width: 600px; margin: 0 auto 32px; }
.hero__btn {
    display: inline-block;
    background: var(--secondary);
    color: var(--dark);
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    transition: transform .2s, box-shadow .2s;
}
.hero__btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--dark);
}

@media (max-width: 768px) {
    .hero h1 { font-size: 1.75rem; }
    .hero { padding: 40px 0; }
}

/* ─── Product grid ─── */
.section { padding: 48px 0; }
.section__title {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
}

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

.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.product-card__img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #f1f5f9;
    padding: 16px;
}
.product-card__body { padding: 20px; }
.product-card__brand {
    font-size: .75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.product-card__name {
    font-size: 1rem;
    font-weight: 700;
    margin: 8px 0;
    min-height: 48px;
}
.product-card__capacity {
    font-size: .85rem;
    color: var(--gray);
    margin-bottom: 12px;
}
.product-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.product-card__current-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
}
.product-card__old-price {
    font-size: .9rem;
    color: var(--gray);
    text-decoration: line-through;
}
.product-card__discount {
    background: var(--danger);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
}
.product-card__btn {
    display: block;
    text-align: center;
    background: var(--primary);
    color: #fff;
    padding: 12px;
    border-radius: var(--radius);
    font-weight: 600;
    margin-top: 16px;
    transition: background .2s;
}
.product-card__btn:hover { background: var(--primary-dark); color: #fff; }

/* ─── Product detail ─── */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px 0;
}
.product-detail__img {
    width: 100%;
    border-radius: var(--radius);
    background: #f1f5f9;
    padding: 32px;
    object-fit: contain;
}
.product-detail__info h1 { font-size: 1.75rem; margin-bottom: 8px; }
.product-detail__brand {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: .85rem;
    letter-spacing: .05em;
    margin-bottom: 16px;
}
.product-detail__price {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 24px;
}
.product-detail__features { list-style: none; margin-bottom: 24px; }
.product-detail__features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.product-detail__features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

@media (max-width: 768px) {
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
}

/* ─── Order form ─── */
.order-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.order-form h3 { margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: .9rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color .2s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
}
.form-check input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}
.form-check label { font-size: .85rem; color: var(--gray); }

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all .2s;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--secondary { background: var(--secondary); color: var(--dark); }
.btn--block { display: block; width: 100%; text-align: center; }
.btn--danger { background: var(--danger); color: #fff; }

/* ─── Giveaway ─── */
.giveaway-section {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    padding: 64px 0;
    text-align: center;
}
.giveaway-section h1 { font-size: 2.5rem; margin-bottom: 16px; }
.giveaway-section .prize { font-size: 3rem; font-weight: 800; margin: 16px 0; }
.giveaway-form {
    max-width: 480px;
    margin: 32px auto 0;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: var(--radius);
}
.giveaway-form input[type="email"] {
    width: 100%;
    padding: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
}
.giveaway-form input[type="email"]::placeholder { color: rgba(255,255,255,.6); }
.giveaway-form input[type="email"]:focus {
    outline: none;
    border-color: #fff;
}
.giveaway-form .form-check label { color: rgba(255,255,255,.8); }
.giveaway-form .btn {
    background: var(--secondary);
    color: var(--dark);
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
}

/* ─── Flash messages ─── */
.flash {
    padding: 14px 20px;
    border-radius: 8px;
    margin: 16px 0;
    font-weight: 500;
}
.flash--success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.flash--error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ─── Footer ─── */
.footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 48px 0 24px;
}
.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}
.footer__col h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 8px; }
.footer__col a { color: #94a3b8; transition: color .2s; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
    border-top: 1px solid #334155;
    padding-top: 24px;
    text-align: center;
    font-size: .85rem;
}

/* ─── Cookie banner ─── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    background: var(--dark);
    color: #fff;
    padding: 20px;
    z-index: 1000;
    display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-banner p { font-size: .9rem; flex: 1; }
.cookie-banner__btns { display: flex; gap: 8px; }
.cookie-banner__btns button {
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: .9rem;
}
.cookie-banner__accept { background: var(--primary); color: #fff; }
.cookie-banner__decline { background: #475569; color: #fff; }

/* ─── Info pages ─── */
.info-page { padding: 48px 0; max-width: 800px; margin: 0 auto; }
.info-page h1 { font-size: 2rem; margin-bottom: 24px; }
.info-page h2 { font-size: 1.3rem; margin: 24px 0 12px; }
.info-page p { margin-bottom: 16px; color: #475569; }
.info-page ul { margin-left: 20px; margin-bottom: 16px; }
.info-page li { margin-bottom: 8px; color: #475569; }

/* ─── Success page ─── */
.success-page {
    text-align: center;
    padding: 80px 0;
}
.success-page .icon { font-size: 4rem; margin-bottom: 16px; }
.success-page h1 { color: var(--success); margin-bottom: 16px; }

/* ─── Related products ─── */
.related { padding: 48px 0; border-top: 1px solid var(--border); }

/* ─── Admin styles ─── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 240px;
    background: var(--dark);
    color: #fff;
    padding: 24px 0;
    flex-shrink: 0;
}
.admin-sidebar__logo {
    padding: 0 20px 24px;
    font-weight: 800;
    font-size: 1.1rem;
    border-bottom: 1px solid #334155;
    margin-bottom: 16px;
}
.admin-sidebar a {
    display: block;
    padding: 10px 20px;
    color: #94a3b8;
    transition: all .2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: rgba(255,255,255,.1);
    color: #fff;
}
.admin-content {
    flex: 1;
    padding: 32px;
    background: var(--light);
    overflow-x: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}
.stat-card__value { font-size: 2rem; font-weight: 800; }
.stat-card__label { color: var(--gray); font-size: .85rem; margin-top: 4px; }

.admin-table {
    width: 100%;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-collapse: collapse;
    font-size: .9rem;
}
.admin-table th, .admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.admin-table th {
    background: #f1f5f9;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--gray);
}
.admin-table tr:hover td { background: #f8fafc; }

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
}
.badge--new { background: #dbeafe; color: #1d4ed8; }
.badge--processing { background: #fef3c7; color: #92400e; }
.badge--completed { background: #d1fae5; color: #065f46; }
.badge--cancelled { background: #fee2e2; color: #991b1b; }
.badge--redirect { background: #fce7f3; color: #9d174d; }

.pagination { display: flex; gap: 8px; margin-top: 24px; justify-content: center; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: .9rem;
}
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

.admin-login {
    max-width: 400px;
    margin: 80px auto;
    background: #fff;
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.admin-login h1 { text-align: center; margin-bottom: 24px; }

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: -240px;
        top: 0; bottom: 0;
        z-index: 200;
        transition: left .3s;
    }
    .admin-sidebar.open { left: 0; }
    .admin-content { padding: 16px; }
}
