/* ============================================
   fatosistore.com — Modern E-Commerce CSS
   Inspired by ofertoj.com — Red/White theme
   ============================================ */

:root {
  --primary: #E53935;
  --primary-dark: #C62828;
  --primary-light: #FF6F60;
  --white: #FFFFFF;
  --bg: #F5F5F5;
  --text: #212121;
  --text-light: #757575;
  --text-muted: #9E9E9E;
  --border: #E0E0E0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.2s ease;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1280px;
  --green: #4CAF50;
  --orange: #FF9800;
  --gold: #FFD700;
  --green-dark: #2E7D32;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== TOP BAR ===== */
.top-bar {
  background: #0d1117;
  color: var(--white);
  padding: 8px 0;
  font-size: 13px;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: rgba(255,255,255,0.85); margin-left: 16px; }
.top-bar a:hover { color: var(--white); }
.top-bar-left { display: flex; align-items: center; gap: 8px; }
.top-bar-right { display: flex; align-items: center; gap: 8px; }

/* ===== HEADER ===== */
.header {
  background: #1a1a2e;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 20px;
}
.logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo span { color: var(--gold); }

.search-bar {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 12px 48px 12px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  background: var(--white);
  color: var(--text);
  outline: none;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  padding: 0 16px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-actions a, .header-actions button {
  color: var(--white);
  background: none;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-actions a:hover, .header-actions button:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
}
.cart-badge {
  background: var(--gold);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ===== CATEGORY NAV ===== */
.cat-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0;
  overflow-x: auto;
}
.cat-nav .container {
  display: flex;
  align-items: center;
  gap: 0;
}
.cat-nav a {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}
.cat-nav a:hover, .cat-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(229,57,53,0.04);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: var(--white);
  padding: 48px 0;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}
.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.hero-text { flex: 1; max-width: 500px; }
.hero-text h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero-text p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 24px;
}
, .hero-text .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  transition: var(--transition);
}
.hero-text .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2); background: var(--green-dark);
}
.hero-products {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.hero-product-card {
  width: 160px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}
.hero-product-card:hover { transform: translateY(-4px); }
.hero-product-card img {
  width: 160px;
  height: 120px;
  object-fit: cover;
}
.hero-product-card .info {
  padding: 10px;
}
.hero-product-card .info h4 {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-product-card .info .price {
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
}

/* ===== SECTION TITLES ===== */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.section-title h2 {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .count {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}
.section-title a {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

/* ===== PRODUCT GRID ===== */
.products-section {
  padding: 40px 0;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
}
.product-card .badge.hot { background: var(--primary); }
.product-card .badge.new { background: var(--green); }
.product-card .badge.sale { background: var(--orange); }
.product-card .badge.aksion { background: #FF1744; }
.product-card .wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--white);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 2;
  transition: var(--transition);
}
.product-card .wishlist-btn:hover { background: #FFF0F0; }
.product-card .wishlist-btn.active { color: var(--primary); }
.product-card .img-wrap {
  position: relative;
  overflow: hidden;
  background: #FAFAFA;
}
.product-card .img-wrap img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .card-body {
  padding: 16px;
}
.product-card .category-tag {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.product-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.product-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.product-card .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}
.product-card .old-price {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.product-card .shipping {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 12px;
}
.product-card .shipping.paid {
  color: var(--text-muted);
}
.product-card .btn-add {
  width: 100%;
  padding: 10px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
}
.product-card .btn-add:hover {
  background: var(--primary-dark);
}
.product-card .btn-buy-now {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
  margin-top: 6px;
}
.product-card .btn-buy-now:hover {
  background: var(--primary-dark);
}

/* ===== CATEGORIES STRIP ===== */
.categories-strip {
  padding: 40px 0 20px;
}
.cat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.cat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.cat-card .icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.cat-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.cat-card p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== PRODUCT DETAIL MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: var(--transition);
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.modal-img {
  background: #FAFAFA;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
.modal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 500px;
}
.modal-info {
  padding: 32px;
}
.modal-info .category-tag {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.modal-info h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}
.modal-info .price {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}
.modal-info .shipping-info {
  font-size: 14px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: #E8F5E9;
  border-radius: var(--radius-sm);
  display: inline-block;
}
.modal-info .description {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.7;
}
.modal-info .qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-info .qty-control button {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  transition: var(--transition);
}
.modal-info .qty-control button:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.modal-info .qty-control span {
  font-size: 18px;
  font-weight: 700;
  min-width: 30px;
  text-align: center;
}
.modal-info .btn-buy {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  transition: var(--transition);
}
.modal-info .btn-buy:hover { background: var(--primary-dark); }

/* ===== CART DRAWER ===== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100%;
  background: var(--white);
  z-index: 1001;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-drawer-header h3 { font-size: 18px; font-weight: 700; }
.cart-drawer-header button {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-light);
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.cart-item-info { flex: 1; }
.cart-item-info h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.cart-item-info .price {
  font-size: 14px;
  color: var(--primary);
  font-weight: 700;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  align-self: center;
}
.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.cart-empty .icon { font-size: 48px; margin-bottom: 12px; }
.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: #FAFAFA;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cart-total .label { font-size: 16px; font-weight: 600; }
.cart-total .amount { font-size: 22px; font-weight: 800; color: var(--primary); }
.btn-checkout {
  width: 100%;
  padding: 14px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  transition: var(--transition);
}
.btn-checkout:hover { background: var(--primary-dark); }

/* ===== CHECKOUT PAGE ===== */
.checkout-section {
  padding: 40px 0;
  max-width: 600px;
  margin: 0 auto;
}
.checkout-section h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 24px;
  text-align: center;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229,57,53,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.order-summary {
  background: #FAFAFA;
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}
.order-summary h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 0;
  font-size: 18px;
  font-weight: 800;
}
.summary-total .amount { color: var(--primary); }
.cod-notice {
  background: #FFF3E0;
  border: 1px solid #FFE0B2;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-place-order {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  transition: var(--transition);
}
.btn-place-order:hover { background: var(--primary-dark); }

/* ===== CONFIRMATION ===== */
.confirmation-section {
  text-align: center;
  padding: 80px 20px;
}
.confirmation-section .check-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.confirmation-section h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}
.confirmation-section p {
  color: var(--text-light);
  font-size: 16px;
  margin-bottom: 24px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.8);
  padding: 48px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-about .logo {
  margin-bottom: 12px;
  display: inline-block;
}
.footer-about p {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.7;
}
.footer-col h4 {
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  padding: 4px 0;
  opacity: 0.7;
  transition: var(--transition);
}
.footer-col a:hover { opacity: 1; color: var(--primary-light); }
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 1;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  opacity: 0.5;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow: 0 4px 12px rgba(37,211,102,0.4);
  z-index: 99;
  transition: var(--transition);
}
.whatsapp-float:hover { transform: scale(1.1); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header .container { flex-wrap: wrap; }
  .search-bar { order: 3; max-width: 100%; }
  .hero .container { flex-direction: column; text-align: center; }
  .hero-text h1 { font-size: 28px; }
  .hero-products { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .modal-body { grid-template-columns: 1fr; }
  .cart-drawer { width: 100%; right: -100%; }
  .form-row { grid-template-columns: 1fr; }
  .cat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
