*{margin:0;padding:0;box-sizing:border-box;font-family:Inter,sans-serif}
:root{--bg:#f5f5f7;--card:#fff;--text:#1d1d1f;--blue:#0071e3;--gray:#86868b}
body{background:var(--bg);color:var(--text)}
body.no-scroll{overflow:hidden;height:100vh}
nav{position:sticky;top:0;z-index:100;backdrop-filter:blur(20px);background:rgba(255,255,255,.85);display:flex;justify-content:space-between;align-items:center;padding:14px 28px;border-bottom:1px solid #e5e5e7}
.logo{font-weight:800;font-size:1.6em}
.search input{background:#e8e8ed;border:none;padding:10px 16px;border-radius:20px;width:280px;outline:none}
.nav-btns{display:flex;align-items:center}
.nav-btns button{background:var(--text);color:white;border:none;padding:10px 18px;border-radius:20px;font-weight:600;cursor:pointer;margin-left:8px}
#cart-quantity{background:var(--blue);padding:2px 8px;border-radius:10px;margin-left:4px}
#theme{background:white!important;color:black!important;border:1px solid #e5e5e7!important}
.hero{padding:50px 30px 10px}
.hero h1{font-size:3.2em;line-height:.95;letter-spacing:-2px}
.hero span{color:var(--gray)}
.filters{position:sticky;top:60px;z-index:90;padding:12px 30px;display:flex;gap:8px;margin-bottom:10px;overflow:auto;backdrop-filter:blur(20px);background:rgba(245,245,247,.9);border-bottom:1px solid #e5e5e7}
.filters button{background:white;border:1px solid #e5e5e7;padding:8px 16px;border-radius:20px;cursor:pointer;white-space:nowrap;text-transform:capitalize}
.filters button.active{background:var(--text);color:white}
.container{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:18px;padding:20px 30px}
.card{background:var(--card);border-radius:22px;padding:10px;cursor:pointer;transition:transform .2s;width:100%}
.card:active{transform:scale(.97)}
.card .img{width:105%;height:210px;background:#f5f5f7;border-radius:16px;overflow:hidden;margin-left:-2.5%}
.card .img img{width:100%;height:100%;object-fit:cover}
.card .info{padding:10px 6px}
.card .info h3{font-size:.98em;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card .info p{font-size:.85em;color:var(--gray);text-transform:capitalize}
.card .bottom{display:flex;justify-content:space-between;align-items:center;margin-top:10px}
.card .add{width:34px;height:34px;border-radius:50%;background:var(--text);color:white;border:none;cursor:pointer}
.slide,.owner-slide{position:fixed;top:0;width:400px;max-width:92%;height:100vh;background:white;z-index:3002;transition:.35s cubic-bezier(.32,.72,0,1);display:flex;flex-direction:column}
.slide{right:-420px}.slide.open{right:0}
.owner-slide{left:-420px}.owner-slide.open{left:0}
.slide-header,.owner-header{padding:20px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #f5f5f7}
.slide-header button,.owner-header button{background:none;border:none;font-size:2em;cursor:pointer}
.slide-content{padding:14px;flex:1;overflow-y:auto}
.slide-card{display:flex;gap:10px;background:#f5f5f7;padding:10px;border-radius:14px;margin-bottom:10px;align-items:center}
.slide-card img{width:56px;height:56px;border-radius:10px;object-fit:cover}
.slide-footer{padding:18px;background:white;border-top:1px solid #f5f5f7}
.total-row{display:flex;justify-content:space-between;margin-bottom:12px}
.checkout{width:100%;padding:14px;background:var(--text);color:white;border:none;border-radius:14px;font-weight:600;cursor:pointer}
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.2);backdrop-filter:blur(8px);z-index:3001;opacity:0;visibility:hidden;pointer-events:none;transition:.25s}
.overlay.open{opacity:1;visibility:visible;pointer-events:auto}
.box-detail{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:4000;opacity:0;visibility:hidden;background:rgba(0,0,0,.3);backdrop-filter:blur(8px);pointer-events:none;transition:.25s}
.box-detail.zoom{opacity:1;visibility:visible;pointer-events:auto}
.detail-card{position:relative;background:white;width:900px;max-width:96%;border-radius:28px;display:grid;grid-template-columns:1.45fr 0.75fr;overflow:hidden;min-height:520px}
.detail-card .detail-img{position:relative;background:#f5f5f7;overflow:hidden;min-height:520px;width:100%}
.slider-track{display:flex;width:100%;height:100%;transition:transform .4s ease}
.slider-track img{width:100%;height:100%;object-fit:cover;flex-shrink:0;min-width:100%}
.slider-btn{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.55);color:white;border:none;width:38px;height:38px;border-radius:50%;cursor:pointer;font-size:20px;backdrop-filter:blur(10px)}
.slider-btn.prev{left:12px}.slider-btn.next{right:12px}
.dots{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);display:flex;gap:6px}
.dots span{width:8px;height:8px;background:rgba(255,255,255,.5);border-radius:50%;cursor:pointer;transition:.2s}
.dots span.active{background:white;width:22px}
.detail-card .detail-info{padding:28px;display:flex;flex-direction:column;justify-content:center}
#owner-form{display:flex;flex-direction:column;gap:12px;padding:20px;overflow-y:auto;flex:1}
#owner-form input,#owner-form select{width:100%;padding:14px;border-radius:12px;border:1px solid #e5e5e7;background:#f5f5f7;outline:none}
.cat-chip{padding:6px 10px;border-radius:20px;font-size:12px;display:flex;gap:6px;align-items:center;border:1px solid #e5e5e7;background:#f5f5f7}
.owner-prod{display:flex;gap:8px;align-items:center;padding:8px;border-radius:10px;margin-bottom:8px;border:1px solid #e5e5e7;background:#f5f5f7}
.owner-prod img{width:36px;height:36px;border-radius:6px;object-fit:cover}
.owner-prod span{flex:1;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.owner-prod select{padding:6px 8px;border-radius:20px;border:1px solid #ddd;font-size:12px;cursor:pointer}
.owner-prod button{background:#ff3b30;color:white;border:none;width:28px;height:28px;border-radius:50%;cursor:pointer}
.qty-label{font-size:11px;color:var(--gray);font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin-top:10px;display:block}
.qty-box{display:flex;align-items:center;gap:12px;margin:8px 0 10px;padding:10px 14px;border-radius:14px;width:fit-content;background:#f5f5f7;border:1px solid #e5e5e7}
.qty-btn{width:38px;height:38px;border-radius:50%;border:1px solid #ddd;background:#fff;color:#000;cursor:pointer;font-size:22px;display:grid;place-items:center}
.qty-num{min-width:36px;text-align:center;font-weight:800;font-size:1.25em}
.stock-left{font-weight:700;font-size:12px;margin:6px 0}
.stock-left.ok{color:#30d158}.stock-left.low{color:#ff9f0a}.stock-left.out{color:#ff3b30}
.close-x{position:absolute;top:12px;right:12px;z-index:20;width:36px;height:36px;border-radius:50%;border:none;background:rgba(0,0,0,.55);color:white;font-size:18px;cursor:pointer;backdrop-filter:blur(12px);display:grid;place-items:center}
.close-x:active{transform:scale(.92)}
.remove-btn{margin-left:auto;width:34px;height:34px;border-radius:50%;border:none;background:#e8e8ed;color:#000;font-size:20px;cursor:pointer;display:grid;place-items:center;flex-shrink:0}
body.dark{background:#101010!important;color:#f5f5f7!important}
body.dark nav{background:rgba(28,28,30,.95)!important;border-color:#2c2c2e!important}
body.dark .filters{background:rgba(16,16,16,.95)!important;border-color:#2c2c2e!important}
body.dark .card{background:#1c1c1e!important;color:#f5f5f7!important}
body.dark .slide,body.dark .owner-slide,body.dark .detail-card,body.dark .slide-footer{background:#1c1c1e!important;color:#fff!important}
body.dark .card .img,body.dark .slide-card,body.dark .detail-card .detail-img{background:#2c2c2e!important}
body.dark .filters button,body.dark .search input,body.dark #owner-form input,body.dark #owner-form select{background:#2c2c2e!important;border-color:#3a3a3c!important;color:white!important}
body.dark .filters button.active,body.dark .checkout{background:white!important;color:black!important}
body.dark #theme{background:black!important;color:white!important;border-color:#333!important}
body.dark .slide-header,body.dark .owner-header{border-color:#2c2c2e!important;background:#1c1c1e!important}
body.dark #owner-close,body.dark #slide-in{color:#fff!important}
body.dark .cat-chip,body.dark .owner-prod{background:#2c2c2e!important;border-color:#3a3a3c!important}
body.dark .qty-box{background:#2c2c2e!important;border-color:#3a3a3c!important}
body.dark .qty-btn{background:#1c1c1e!important;border-color:#3a3a3c!important;color:#fff!important}
body.dark .qty-num{color:#fff!important}
body.dark .close-x{background:rgba(255,255,255,.18)!important;color:white!important}
body.dark .remove-btn{background:rgba(255,255,255,.18)!important;color:white!important;border:1px solid rgba(255,255,255,.15)!important}
@media(max-width:700px){
  nav{padding:10px 14px;flex-wrap:wrap;gap:10px}
  .search{display:flex!important;width:100%;order:3}
  .search input{width:100%!important}
  .hero h1{font-size:2.2em}
  .filters{top:110px;padding:10px 12px}
  .container{grid-template-columns:repeat(2,1fr);gap:10px;padding:12px}
  .card .img{height:160px;width:105%;margin-left:-2.5%}
  .box-detail{align-items:center;padding:12px}
  .detail-card{width:100%;max-width:100%;max-height:96vh;border-radius:22px;display:flex;flex-direction:column;overflow:hidden;animation:slideUp .32s cubic-bezier(.32,.72,0,1)}
  .detail-card .detail-img{min-height:48vh;max-height:48vh;height:48vh;flex-shrink:0;width:100%}
  .slider-track img{height:48vh;min-height:48vh;object-fit:cover}
  .detail-card .detail-info{flex:1;overflow-y:auto;padding:16px;justify-content:flex-start;gap:4px}
  .qty-box{width:100%;justify-content:space-between}
  .detail-info button{width:100%}
  .close-x{top:10px;right:10px;width:34px;height:34px}
}
@keyframes slideUp{from{transform:translateY(40px);opacity:0}to{transform:translateY(0);opacity:1}}