/* ============================================
   iPhone Store - Flipkart Style Theme
   ============================================ */
* { margin:0; padding:0; box-sizing:border-box; font-family:'Segoe UI', Arial, sans-serif; }
body { background:#f1f3f6; color:#212121; }
a { text-decoration:none; color:inherit; }
img { max-width:100%; }

/* ---------- NAVBAR ---------- */
.navbar { background:#2874f0; padding:10px 0; position:sticky; top:0; z-index:100; box-shadow:0 2px 8px rgba(0,0,0,.2); }
.nav-container { max-width:1240px; margin:auto; display:flex; align-items:center; gap:20px; padding:0 15px; flex-wrap:wrap; }
.logo { color:#fff; font-size:24px; font-weight:bold; font-style:italic; }
.logo span { color:#ffe500; }
.search-box { flex:1; display:flex; min-width:200px; }
.search-box input { flex:1; padding:10px 15px; border:none; border-radius:4px 0 0 4px; font-size:14px; outline:none; }
.search-box button { padding:10px 18px; border:none; background:#fff; border-radius:0 4px 4px 0; cursor:pointer; font-size:16px; }
.nav-links { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.nav-links a { color:#fff; font-size:14px; font-weight:500; }
.nav-links a:hover { text-decoration:underline; }
.nav-links a.active { border-bottom:2px solid #ffe500; }
.btn-login { background:#fff; color:#2874f0 !important; padding:7px 22px !important; border-radius:4px; font-weight:bold; }
.badge { background:#ff6161; color:#fff; font-size:11px; padding:2px 7px; border-radius:50%; }

/* ---------- LAYOUT ---------- */
.container { max-width:1240px; margin:20px auto; padding:0 15px; min-height:60vh; }
.section-title { font-size:22px; margin:25px 0 15px; }
.page-head { display:flex; justify-content:space-between; align-items:center; margin:25px 0 15px; flex-wrap:wrap; gap:10px; }
.sort-form select { padding:8px 12px; border:1px solid #ccc; border-radius:4px; }

/* ---------- ALERTS ---------- */
.alert-bar { background:#e7f5e9; color:#1b7a2e; text-align:center; padding:10px; font-weight:500; max-width:1240px; margin:10px auto; border-radius:4px; }
.alert-bar.error { background:#fde8e8; color:#c62828; }

/* ---------- HERO ---------- */
.hero { background:linear-gradient(135deg,#2874f0,#1a54b8); border-radius:10px; display:flex; align-items:center; justify-content:space-between; padding:50px; color:#fff; margin-top:10px; flex-wrap:wrap; }
.hero-text h1 { font-size:42px; margin-bottom:15px; }
.hero-text p { font-size:18px; margin-bottom:25px; opacity:.9; }
.hero-img { font-size:120px; }
.btn-hero { background:#ffe500; color:#212121; padding:13px 32px; border-radius:4px; font-weight:bold; display:inline-block; }
.btn-hero:hover { background:#ffd000; }

/* ---------- FEATURES ---------- */
.features-strip { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin:20px 0; }
.feature { background:#fff; padding:16px; border-radius:8px; text-align:center; font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,.08); }

/* ---------- PRODUCT GRID ---------- */
.product-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:15px; }
.product-card { background:#fff; border-radius:8px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.1); transition:.2s; display:flex; flex-direction:column; }
.product-card:hover { transform:translateY(-4px); box-shadow:0 6px 16px rgba(0,0,0,.15); }
.product-img { display:flex; align-items:center; justify-content:center; height:200px; background:#f8f9fa; }
.product-img img { max-height:180px; object-fit:contain; }
.img-placeholder { font-size:80px; }
.img-placeholder.big { font-size:160px; }
.product-info { padding:15px; display:flex; flex-direction:column; gap:6px; flex:1; }
.product-name { font-size:16px; font-weight:600; color:#212121; }
.product-name:hover { color:#2874f0; }
.product-meta { font-size:13px; color:#878787; }
.product-price { font-size:20px; font-weight:bold; color:#212121; }

/* ---------- BUTTONS ---------- */
.btn-cart { background:#ff9f00; color:#fff; border:none; padding:11px; border-radius:4px; font-weight:bold; cursor:pointer; width:100%; font-size:14px; margin-top:auto; }
.btn-cart:hover { background:#f39700; }
.btn-buy { background:#fb641b; color:#fff; border:none; padding:11px 25px; border-radius:4px; font-weight:bold; cursor:pointer; font-size:14px; }
.btn-buy:hover { background:#f25c14; }
.big-btn { padding:14px 30px; font-size:16px; }
.btn-disabled { background:#bdbdbd; cursor:not-allowed; }
.btn-remove { background:none; border:none; font-size:20px; cursor:pointer; }

/* ---------- PRODUCT DETAIL ---------- */
.product-detail { background:#fff; border-radius:8px; display:grid; grid-template-columns:1fr 1.4fr; gap:40px; padding:40px; margin-top:10px; }
.detail-img { display:flex; align-items:center; justify-content:center; background:#f8f9fa; border-radius:8px; min-height:350px; }
.detail-img img { max-height:380px; }
.detail-info h1 { font-size:28px; margin-bottom:12px; }
.detail-tags { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.tag { background:#f1f3f6; padding:5px 12px; border-radius:20px; font-size:13px; }
.tag-green { background:#e7f5e9; color:#1b7a2e; }
.tag-red { background:#fde8e8; color:#c62828; }
.detail-price { font-size:36px; font-weight:bold; margin-bottom:15px; }
.detail-desc { color:#555; line-height:1.7; margin-bottom:25px; }
.detail-actions { display:flex; gap:15px; flex-wrap:wrap; }

/* ---------- CART / CHECKOUT ---------- */
.cart-layout { display:grid; grid-template-columns:2fr 1fr; gap:20px; align-items:start; }
.cart-items { display:flex; flex-direction:column; gap:12px; }
.cart-item { background:#fff; border-radius:8px; padding:15px; display:flex; align-items:center; gap:15px; box-shadow:0 1px 3px rgba(0,0,0,.08); }
.cart-img { width:90px; height:90px; display:flex; align-items:center; justify-content:center; background:#f8f9fa; border-radius:6px; }
.cart-img img { max-height:80px; }
.cart-img .img-placeholder { font-size:45px; }
.cart-info { flex:1; }
.cart-qty input { width:60px; padding:7px; border:1px solid #ccc; border-radius:4px; text-align:center; }
.cart-subtotal { font-weight:bold; font-size:17px; min-width:90px; text-align:right; }
.cart-summary { background:#fff; border-radius:8px; padding:20px; box-shadow:0 1px 3px rgba(0,0,0,.08); position:sticky; top:80px; }
.cart-summary h3 { border-bottom:1px solid #eee; padding-bottom:12px; margin-bottom:12px; }
.summary-row { display:flex; justify-content:space-between; padding:7px 0; font-size:14px; gap:10px; }
.summary-row.total { font-weight:bold; font-size:18px; border-top:1px dashed #ccc; margin-top:8px; padding-top:12px; }
.card-box { background:#fff; border-radius:8px; padding:22px; box-shadow:0 1px 3px rgba(0,0,0,.08); margin-bottom:15px; }
.card-box h3 { margin-bottom:15px; }

/* ---------- FORMS ---------- */
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-group { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.form-group.full { grid-column:1/-1; }
.form-group label { font-size:13px; font-weight:600; color:#555; }
.form-group input, .form-group textarea, .form-group select { padding:11px; border:1px solid #ccc; border-radius:4px; font-size:14px; outline:none; width:100%; }
.form-group input:focus, .form-group textarea:focus { border-color:#2874f0; }

/* ---------- AUTH ---------- */
.auth-box { background:#fff; max-width:420px; margin:50px auto; padding:35px; border-radius:10px; box-shadow:0 3px 12px rgba(0,0,0,.12); }
.auth-box h2 { margin-bottom:20px; text-align:center; }

/* ---------- WALLET ---------- */
.wallet-layout { display:grid; grid-template-columns:1fr 1.6fr; gap:20px; align-items:start; }
.wallet-balance-box { background:linear-gradient(135deg,#2874f0,#1a54b8); color:#fff; border-radius:10px; padding:30px; text-align:center; margin-bottom:15px; }
.wallet-balance-box h1 { font-size:40px; margin-top:8px; }
.amount-chips { display:flex; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.chip { background:#f1f3f6; border:1px solid #ddd; padding:8px 16px; border-radius:20px; cursor:pointer; font-weight:600; }
.chip:hover { background:#2874f0; color:#fff; }

/* ---------- TABLES ---------- */
.table { width:100%; border-collapse:collapse; font-size:14px; }
.table th { background:#f1f3f6; padding:11px; text-align:left; font-weight:600; }
.table td { padding:11px; border-bottom:1px solid #eee; }
.table tr:hover td { background:#fafafa; }

/* ---------- STATUS TAGS ---------- */
.status-pending { background:#fff3e0; color:#e65100; }
.status-success, .status-delivered { background:#e7f5e9; color:#1b7a2e; }
.status-confirmed { background:#e3f2fd; color:#1565c0; }
.status-shipped { background:#f3e5f5; color:#6a1b9a; }
.status-cancelled, .status-rejected { background:#fde8e8; color:#c62828; }

/* ---------- ORDERS ---------- */
.order-card { background:#fff; border-radius:8px; margin-bottom:15px; box-shadow:0 1px 3px rgba(0,0,0,.08); overflow:hidden; }
.order-head { background:#f8f9fa; padding:14px 18px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.order-body { padding:18px; }
.order-address { margin-top:12px; padding:12px; background:#f8f9fa; border-radius:6px; font-size:13px; color:#555; }

/* ---------- PAY BOX ---------- */
.pay-box { background:#fff; max-width:520px; margin:40px auto; padding:40px; border-radius:10px; text-align:center; box-shadow:0 3px 12px rgba(0,0,0,.12); }
.pay-amount { font-size:42px; font-weight:bold; color:#2874f0; margin:15px 0; }
.demo-box { background:#fffbe6; border:1px dashed #e6b800; border-radius:8px; padding:20px; margin-top:20px; display:flex; flex-direction:column; gap:12px; align-items:center; }

/* ---------- EMPTY ---------- */
.empty-box { text-align:center; padding:60px 20px; background:#fff; border-radius:10px; }

/* ---------- FOOTER ---------- */
.footer { background:#172337; color:#c2c9d6; margin-top:50px; }
.footer-container { max-width:1240px; margin:auto; display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:25px; padding:40px 20px; }
.footer-col h4 { color:#fff; margin-bottom:12px; }
.footer-col a { display:block; padding:4px 0; font-size:14px; }
.footer-col a:hover { color:#fff; }
.footer-col p { font-size:14px; line-height:1.7; }
.footer-bottom { background:#0f1a2b; text-align:center; padding:14px; font-size:13px; }

/* ---------- ADMIN ---------- */
.admin-body { background:#f1f3f6; }
.admin-nav { background:#172337; padding:12px 0; }
.admin-nav .nav-container { gap:15px; }
.admin-nav a { color:#c2c9d6; font-size:14px; padding:8px 12px; border-radius:4px; }
.admin-nav a:hover, .admin-nav a.active { background:#2874f0; color:#fff; }
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:15px; margin:20px 0; }
.stat-card { background:#fff; border-radius:8px; padding:22px; box-shadow:0 1px 3px rgba(0,0,0,.08); border-left:4px solid #2874f0; }
.stat-card h2 { font-size:30px; margin-top:6px; }
.stat-card p { color:#878787; font-size:14px; }
.admin-table-box { background:#fff; border-radius:8px; padding:20px; box-shadow:0 1px 3px rgba(0,0,0,.08); overflow-x:auto; }
.btn-sm { padding:6px 12px; font-size:13px; border-radius:4px; border:none; cursor:pointer; font-weight:600; }
.btn-edit { background:#2874f0; color:#fff; }
.btn-del { background:#e53935; color:#fff; }
.btn-add { background:#1b7a2e; color:#fff; padding:10px 20px; border-radius:4px; font-weight:bold; display:inline-block; margin-bottom:15px; border:none; cursor:pointer; }
.admin-img-thumb { width:50px; height:50px; object-fit:contain; background:#f8f9fa; border-radius:4px; }
.status-select { padding:6px 10px; border:1px solid #ccc; border-radius:4px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .cart-layout, .wallet-layout, .product-detail { grid-template-columns:1fr; }
  .hero { padding:30px; }
  .hero-text h1 { font-size:30px; }
  .hero-img { font-size:70px; }
  .form-grid { grid-template-columns:1fr; }
  .nav-container { justify-content:center; }
}
