* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f7f8fa;
    --white: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --dark: #0f172a;
    --primary: #111827;
    --secondary: #ffffff;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(0,0,0,0.06);
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1280px, 92%);
    margin: 0 auto;
}

.topbar {
    background: #0b1220;
    color: #fff;
    font-size: 14px;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar-left,
.topbar-right {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-inner {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 18px 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
}

.nav-search {
    display: flex;
    gap: 10px;
}

.nav-search input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    outline: none;
    background: #fafafa;
}

.nav-search button {
    height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    background: var(--dark);
    color: #fff;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.category-bar {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.category-links {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 12px 0;
}

.category-links a {
    white-space: nowrap;
    color: var(--muted);
    font-weight: 600;
}

.hero {
    padding: 60px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 28px;
    align-items: stretch;
}

.hero-content,
.hero-card {
    background: var(--white);
    border-radius: 28px;
    padding: 42px;
    box-shadow: var(--shadow);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.hero h1 {
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero p {
    color: var(--muted);
    max-width: 680px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef2ff;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 700;
}

.section {
    padding: 60px 0;
}

.section.alt {
    background: #f1f3f7;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-head h2 {
    font-size: 32px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.category-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    min-height: 130px;
    display: flex;
    align-items: end;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product-card {
    background: var(--white);
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.product-image-wrap {
    background: #f8fafc;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 18px;
}

.product-meta {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.product-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-price {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
}

.product-price.big {
    font-size: 28px;
    margin-bottom: 14px;
}

.old-price {
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.why-card {
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.why-card h3 {
    margin-bottom: 10px;
}

.page-hero.small {
    padding: 40px 0 10px;
}

.page-hero.small h1 {
    font-size: 40px;
    margin-bottom: 8px;
}

.shop-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

.shop-sidebar,
.shop-content,
.filter-box,
.product-description-box,
.info-box {
    background: var(--white);
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.filter-box {
    padding: 20px;
}

.filter-box h3 {
    margin-bottom: 18px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    outline: none;
    background: #fafafa;
}

.shop-content {
    padding: 20px;
}

.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.product-gallery,
.product-info {
    background: var(--white);
    border-radius: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 24px;
}

.main-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 14px;
    background: #f8fafc;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumb-grid img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.stock-status {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 16px;
}

.in-stock {
    background: #dcfce7;
    color: #166534;
}

.out-stock {
    background: #fee2e2;
    color: #991b1b;
}

.short-desc {
    color: var(--muted);
    margin-bottom: 20px;
}

.product-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.product-specs {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.info-box {
    padding: 18px;
    margin-bottom: 14px;
}

.product-description-box {
    padding: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    border: 1px solid var(--dark);
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: var(--dark);
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: var(--dark);
}

.full {
    width: 100%;
}

.footer {
    background: #0b1220;
    color: #fff;
    margin-top: 50px;
    padding-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 24px;
    padding-bottom: 30px;
}

.footer h3,
.footer h4 {
    margin-bottom: 14px;
}

.footer p,
.footer li,
.footer a {
    color: rgba(255,255,255,0.8);
}

.footer ul {
    list-style: none;
}

.footer li {
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 18px 0;
    color: rgba(255,255,255,0.7);
}

@media (max-width: 1100px) {
    .hero-grid,
    .shop-layout,
    .product-page,
    .footer-grid,
    .why-grid,
    .category-grid,
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-inner {
        grid-template-columns: 1fr;
    }

    .nav-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 700px) {
    .hero h1 {
        font-size: 34px;
    }

    .hero-content,
    .hero-card,
    .shop-content,
    .product-gallery,
    .product-info {
        padding: 22px;
    }

    .hero-grid,
    .shop-layout,
    .product-page,
    .footer-grid,
    .why-grid,
    .category-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .topbar-inner,
    .nav-search,
    .section-head,
    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ADMIN PANEL */

.admin-page{
max-width:1000px;
margin:40px auto;
background:#ffffff;
border:1px solid #e5e7eb;
border-radius:24px;
padding:30px;
box-shadow:0 10px 30px rgba(0,0,0,0.06);
}

.admin-page h1{
margin-bottom:10px;
}

.admin-page p{
margin-bottom:20px;
}

.grid-2{
display:grid;
grid-template-columns:1fr 1fr;
gap:18px;
}

.grid-2 div{
display:flex;
flex-direction:column;
}

.grid-2 label{
font-weight:600;
margin-bottom:6px;
}

.grid-2 input,
.grid-2 select,
.grid-2 textarea{
width:100%;
border:1px solid #e5e7eb;
border-radius:12px;
padding:10px 14px;
font-size:14px;
}

.grid-2 input,
.grid-2 select{
height:46px;
}

.grid-2 textarea{
min-height:120px;
resize:vertical;
}

.success-box{
background:#dcfce7;
color:#166534;
padding:12px 14px;
border-radius:12px;
margin-bottom:16px;
}

.error-box{
background:#fee2e2;
color:#991b1b;
padding:12px 14px;
border-radius:12px;
margin-bottom:16px;
}

.admin-page button{
margin-top:20px;
}

.qty-input{
    width:90px;
    height:48px;
    border:1px solid var(--line);
    border-radius:12px;
    padding:0 12px;
    outline:none;
    background:#fff;
}

.cart-layout{
    display:grid;
    grid-template-columns:1.6fr .7fr;
    gap:24px;
    align-items:start;
}

.cart-table-box,
.cart-summary,
.empty-cart-box{
    background:#fff;
    border:1px solid var(--line);
    border-radius:22px;
    box-shadow:var(--shadow);
    padding:24px;
}

.cart-table{
    width:100%;
    border-collapse:collapse;
    margin-bottom:18px;
}

.cart-table th,
.cart-table td{
    text-align:left;
    padding:14px 10px;
    border-bottom:1px solid var(--line);
    vertical-align:middle;
}

.cart-product{
    display:flex;
    align-items:center;
    gap:14px;
}

.cart-product img{
    width:72px;
    height:72px;
    object-fit:cover;
    border-radius:12px;
    background:#f8fafc;
    border:1px solid var(--line);
}

.cart-qty-input{
    width:80px;
    height:44px;
    border:1px solid var(--line);
    border-radius:10px;
    padding:0 10px;
    background:#fff;
}

.cart-remove-btn{
    border:none;
    background:#fee2e2;
    color:#991b1b;
    border-radius:10px;
    padding:10px 14px;
    font-weight:700;
    cursor:pointer;
}

.cart-summary h3{
    margin-bottom:18px;
}

.summary-row{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:12px 0;
    border-bottom:1px solid var(--line);
}

.summary-row.total{
    font-size:18px;
    border-bottom:none;
    padding-top:18px;
}

.empty-cart-box{
    text-align:center;
}

.empty-cart-box h2{
    margin-bottom:10px;
}

.empty-cart-box p{
    color:var(--muted);
    margin-bottom:20px;
}

@media (max-width: 900px){
    .cart-layout{
        grid-template-columns:1fr;
    }

    .cart-table{
        min-width:700px;
    }

    .cart-table-box{
        overflow:auto;
    }
}

.auth-wrap{
    display:flex;
    justify-content:center;
}

.auth-card{
    width:min(520px,100%);
    background:#fff;
    border:1px solid var(--line);
    border-radius:24px;
    box-shadow:var(--shadow);
    padding:30px;
}

.auth-card h1{
    margin-bottom:10px;
}

.auth-card p{
    color:var(--muted);
    margin-bottom:20px;
}

.auth-form{
    display:grid;
    gap:16px;
}

.auth-links{
    margin-top:18px;
    color:var(--muted);
}

.auth-links a{
    font-weight:700;
}

.account-layout{
    display:grid;
    grid-template-columns: .9fr 1.1fr;
    gap:24px;
    align-items:start;
}

.account-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:24px;
    box-shadow:var(--shadow);
    padding:28px;
}

.account-card h1,
.account-card h2{
    margin-bottom:18px;
}

.account-info{
    display:grid;
    gap:12px;
    margin-bottom:24px;
}

.orders-list{
    display:grid;
    gap:14px;
}

.order-item{
    border:1px solid var(--line);
    border-radius:16px;
    padding:16px;
    background:#fafafa;
    display:grid;
    gap:8px;
}

@media (max-width: 900px){
    .account-layout{
        grid-template-columns:1fr;
    }
}

.checkout-layout{
    display:grid;
    grid-template-columns:1.3fr .8fr;
    gap:24px;
    align-items:start;
}

.checkout-form-box,
.checkout-summary-box{
    background:#fff;
    border:1px solid var(--line);
    border-radius:24px;
    box-shadow:var(--shadow);
    padding:28px;
}

.checkout-form-box h2,
.checkout-summary-box h2{
    margin-bottom:20px;
}

.checkout-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.checkout-grid .full{
    grid-column:1 / -1;
}

.checkout-grid input,
.checkout-grid select,
.checkout-grid textarea{
    width:100%;
    border:1px solid var(--line);
    border-radius:12px;
    padding:12px 14px;
    background:#fff;
    outline:none;
}

.checkout-grid input,
.checkout-grid select{
    height:48px;
}

.checkout-grid textarea{
    min-height:120px;
    resize:vertical;
}

.checkout-items{
    display:grid;
    gap:14px;
    margin-bottom:20px;
}

.checkout-item{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center;
    padding-bottom:14px;
    border-bottom:1px solid var(--line);
}

.checkout-item-left{
    display:flex;
    gap:12px;
    align-items:center;
}

.checkout-item-left img{
    width:64px;
    height:64px;
    object-fit:cover;
    border-radius:12px;
    border:1px solid var(--line);
    background:#f8fafc;
}

.checkout-item-left span{
    display:block;
    font-size:14px;
    color:var(--muted);
    margin-top:4px;
}

.terms-row{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:600;
}

.terms-row input{
    width:auto;
    height:auto;
}

@media (max-width: 900px){
    .checkout-layout{
        grid-template-columns:1fr;
    }

    .checkout-grid{
        grid-template-columns:1fr;
    }

    .checkout-grid .full{
        grid-column:auto;
    }
}

.accordion-header{
cursor:pointer;
font-weight:700;
display:flex;
justify-content:space-between;
align-items:center;
font-size:18px;
}

.accordion-content{
display:none;
margin-top:12px;
line-height:1.6;
}

.accordion.active .accordion-content{
display:block;
}

/* ---------------------------
PRODUCT PAGE MOBILE
---------------------------*/

@media (max-width: 900px){

.product-page{
display:block;
}

.product-gallery{
margin-bottom:24px;
}

.main-product-image{
width:100%;
border-radius:18px;
}

.thumb-grid{
display:flex;
gap:10px;
margin-top:12px;
overflow-x:auto;
}

.thumb-grid img{
width:70px;
height:70px;
border-radius:10px;
object-fit:cover;
}

.product-info h1{
font-size:26px;
line-height:1.3;
margin-bottom:10px;
}

.product-price.big{
font-size:24px;
margin-bottom:12px;
}

.stock-status{
margin-bottom:14px;
}

.product-actions{
display:flex;
flex-direction:column;
gap:12px;
margin-top:16px;
}

.qty-input{
width:100%;
height:48px;
font-size:16px;
}

.product-actions button{
width:100%;
height:50px;
font-size:16px;
}

.product-specs{
margin-top:20px;
font-size:14px;
}

.info-box{
margin-top:18px;
padding:18px;
border-radius:14px;
}

.accordion-header{
font-size:18px;
}

.accordion-content{
font-size:14px;
}

}

/* ---------------------------
RELATED PRODUCTS MOBILE
---------------------------*/

@media (max-width: 900px){

.product-grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:16px;
}

.product-card img{
height:160px;
object-fit:cover;
}

.product-body h3{
font-size:14px;
}

.product-price{
font-size:15px;
}

}

/* ---------------------------
SMALL PHONES
---------------------------*/

@media (max-width: 480px){

.product-grid{
grid-template-columns:1fr 1fr;
gap:12px;
}

.product-card img{
height:140px;
}

.product-body{
padding:12px;
}

.product-body h3{
font-size:13px;
}

.product-price{
font-size:14px;
}

}

/* =========================
HEADER / MOBILE NAV
========================= */

.mobile-topbar{
    display:none;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    width:100%;
}

.desktop-logo{
    display:block;
}

.burger-btn{
    display:none;
    width:46px;
    height:46px;
    border:none;
    background:#0b132b;
    border-radius:12px;
    padding:10px;
    cursor:pointer;
    flex-direction:column;
    justify-content:center;
    gap:5px;
}

.burger-btn span{
    display:block;
    width:100%;
    height:2px;
    background:#fff;
    border-radius:2px;
}

@media (max-width: 900px){
    .topbar{
        display:none;
    }

    .navbar{
        position:sticky;
        top:0;
        z-index:100;
    }

    .nav-inner{
        display:flex;
        flex-direction:column;
        align-items:stretch;
        gap:14px;
        padding:14px 0;
    }

    .desktop-logo{
        display:none;
    }

    .mobile-topbar{
        display:flex;
    }

    .burger-btn{
        display:flex;
    }

    .logo{
        font-size:34px;
        font-weight:900;
        letter-spacing:1px;
    }

    .nav-search{
        display:flex;
        gap:10px;
        width:100%;
    }

    .nav-search input{
        height:50px;
        font-size:16px;
        border-radius:14px;
        padding:0 16px;
    }

    .nav-search button{
        height:50px;
        border-radius:14px;
        padding:0 16px;
        white-space:nowrap;
    }

    .nav-links{
        display:none;
        flex-direction:column;
        gap:10px;
        background:#fff;
        border:1px solid var(--line);
        border-radius:18px;
        padding:14px;
    }

    .nav-links.mobile-open{
        display:flex;
    }

    .nav-links a{
        padding:12px 14px;
        border-radius:12px;
        background:#f8fafc;
        font-weight:700;
    }

    .category-links{
        gap:12px;
        padding:10px 0;
    }
}

/* =========================
PRODUCT GRID MOBILE 2x2
========================= */

@media (max-width: 900px){
    .product-grid{
        display:grid;
        grid-template-columns:1fr 1fr !important;
        gap:14px;
    }

    .product-card{
        border-radius:18px;
        overflow:hidden;
    }

    .product-image-wrap{
        aspect-ratio:1 / 1;
    }

    .product-image-wrap img{
        width:100%;
        height:100%;
        object-fit:cover;
    }

    .product-body{
        padding:12px;
    }

    .product-card h3{
        font-size:14px;
        line-height:1.35;
        margin-bottom:8px;
    }

    .product-price{
        font-size:16px;
    }

    .product-meta{
        font-size:12px;
        margin-bottom:6px;
    }

    .card-ship-badge{
        top:10px;
        right:10px;
        padding:6px 10px;
        font-size:11px;
    }
}

@media (max-width: 480px){
    .product-grid{
        grid-template-columns:1fr 1fr !important;
        gap:12px;
    }

    .product-body{
        padding:10px;
    }

    .product-card h3{
        font-size:13px;
    }

    .product-price{
        font-size:15px;
    }
}

/* =========================
SHOP PAGE MOBILE
========================= */

@media (max-width: 900px){
    .shop-layout{
        display:block;
    }

    .shop-sidebar{
        margin-bottom:18px;
    }

    .shop-content{
        padding:16px;
    }

    .filter-box{
        padding:16px;
    }

    .section-head h2{
        font-size:26px;
    }
}

/* =========================
CATEGORY GRID MOBILE
========================= */

@media (max-width: 900px){
    .category-grid{
        grid-template-columns:1fr 1fr;
        gap:14px;
    }

    .category-card{
        min-height:100px;
        padding:18px;
        border-radius:18px;
        font-size:14px;
    }
}

/* =========================
PRODUCT PAGE MOBILE
========================= */

@media (max-width: 900px){
    .product-page{
        display:block;
    }

    .product-gallery{
        margin-bottom:20px;
    }

    .main-product-image{
        width:100%;
        border-radius:18px;
    }

    .thumb-grid{
        display:flex;
        gap:10px;
        margin-top:12px;
        overflow-x:auto;
        grid-template-columns:none;
    }

    .thumb-grid img{
        width:72px;
        height:72px;
        flex:0 0 auto;
    }

    .product-info h1{
        font-size:28px;
        line-height:1.25;
    }

    .product-price.big{
        font-size:24px;
    }

    .product-actions{
        display:flex;
        flex-direction:column;
        gap:12px;
    }

    .qty-input{
        width:100%;
    }

    .product-actions .btn{
        width:100%;
    }
}

/* =========================
CART MOBILE
========================= */

@media (max-width: 900px){
    .cart-layout-new{
        grid-template-columns:1fr;
    }

    .cart-summary-box-new{
        position:static;
    }

    .cart-box{
        overflow-x:auto;
    }

    .cart-inner-min{
        min-width:850px;
    }
}