/* 
  Aqua Pure Design System
  Minimalist, Premium, Blue Accents
*/

:root {
  --primary: #0A66C2; /* Premium Blue */
  --primary-hover: #08529e;
  --secondary: #F3F6F8;
  --text-dark: #1F2937;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --bg: #FAFAFA;
  --white: #FFFFFF;
  --success: #10B981;
  --danger: #EF4444;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-hover);
}

/* Header */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}
.logo-container img {
  height: 40px;
}
.search-bar {
  flex: 1;
  max-width: 500px;
  margin: 0 2rem;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--secondary);
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}
.search-bar input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.1);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.action-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}
.cart-icon {
  position: relative;
}
.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Layout */
.main-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  gap: 2rem;
}
.sidebar {
  width: 250px;
  flex-shrink: 0;
}
.content {
  flex: 1;
}

/* Sidebar */
.filter-section {
  margin-bottom: 2rem;
}
.filter-title {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}
.filter-list {
  list-style: none;
}
.filter-list li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dark);
  font-size: 0.95rem;
  cursor: pointer;
}
.filter-list li input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}
.filter-link {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  width: 100%;
}
.filter-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-link.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Product Grid */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.badge {
  position: absolute;
  top: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.stock {
  right: 1rem;
  background: #E0F2FE;
  color: #0369A1;
}
.badge.out-of-stock {
  right: 1rem;
  background: #FEE2E2;
  color: #B91C1C;
}
.badge.sale {
  left: 1rem;
  background: #DBEAFE;
  color: var(--primary);
}
.product-img {
  width: 120px;
  height: 180px;
  object-fit: contain;
  margin: 0 auto 1rem;
}
.product-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  text-align: left;
}
.product-size {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  text-align: left;
}
.product-price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.product-price {
  font-weight: 700;
  font-size: 1.2rem;
}
.product-old-price {
  color: var(--text-light);
  text-decoration: line-through;
  font-size: 0.9rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  width: 100%;
  font-family: inherit;
}
.btn-primary {
  background: var(--white);
  color: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary);
  color: var(--white);
}
.btn-primary.solid {
  background: var(--primary);
  color: var(--white);
}
.btn-primary.solid:hover {
  background: var(--primary-hover);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.mt-auto { margin-top: auto; }

/* Features Banner */
.features-banner {
  display: flex;
  justify-content: space-between;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
}
.feature-text h4 {
  font-size: 0.95rem;
  font-weight: 600;
}
.feature-text p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.1);
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

/* Checkout Page Specific */
.checkout-container {
  max-width: 800px;
  margin: 3rem auto;
}
.order-summary {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}
.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Modern Footer */
.modern-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 4rem 1rem 2rem 1rem;
  margin-top: 4rem;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer-brand p {
  line-height: 1.6;
}
.footer-contact p {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-links a {
  color: var(--text-light);
}
.footer-links a:hover {
  color: var(--primary);
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Mobile Navigation & Sidebar */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 999;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}
.mobile-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 0.5rem 0.5rem 1rem 0.5rem;
  position: relative;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-light);
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 500;
  width: 15%;
}
.mobile-nav-item svg {
  width: 24px;
  height: 24px;
}
.mobile-nav-item.active {
  color: var(--primary);
}
.nav-center-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -20px;
  background: var(--primary);
  color: var(--white);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(10, 102, 194, 0.3);
  border: 4px solid var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 10;
}
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  padding: 0.5rem;
}
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1001;
}

@media (min-width: 769px) {
  .mobile-only-install {
    display: none !important;
  }
}

/* Hide install buttons when app is already installed and running standalone */
@media all and (display-mode: standalone) {
  .install-app-btn {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 250px;
    height: 100vh;
    background: var(--white);
    z-index: 1002;
    padding: 2rem 1.5rem;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    overflow-y: auto;
  }
  .sidebar.open {
    left: 0;
  }
  .mobile-overlay.open {
    display: block;
  }
  .features-banner {
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 80px; /* space for bottom nav */
  }
  .header-container {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .search-bar {
    width: 100%;
    max-width: 100%;
    margin: 0;
    order: 3;
    display: flex;
  }
  .header-actions {
    display: none; 
  }
  .mobile-menu-toggle {
    display: block;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .product-card {
    padding: 1rem;
  }
  .product-img {
    width: 100%;
    height: 120px;
  }
  .product-title {
    font-size: 0.95rem;
  }
  .product-price {
    font-size: 1rem;
  }
  .mobile-nav {
    display: block;
  }
  body {
    padding-bottom: 80px;
  }
}
