@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ==========================================
   1. VARIABLES
   ========================================== */
:root {
  /* Layout — change these to resize the whole site */
  --page-max-width: 1400px;
  --page-padding-x: 24px;

  /* Backgrounds */
  --bg: #fdf4f7;
  --bg-account: #f4f6f9;
  --bg-surface: #fffafc;
  --card-bg: #ffffff;

  /* Brand */
  --primary: #d91557;
  --primary-hover: #b80f47;
  --primary-soft: #fbd2e0;
  --primary-soft-hover: #f7becf;
  --accent: #fdc900;
  --accent-hover: #e5b600;

  /* Text */
  --text-dark: #2d394b;
  --text-muted: #786c75;

  /* Borders & states */
  --border-color: #f3e2e8;
  --border-soft: #faeef2;
  --danger: #ef4444;
  --danger-hover: #dc2626;
}

.page-container,
.site-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* ==========================================
   2. RESET & BASE
   ========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* ==========================================
   3. SHARED PAGE CONTAINER
   Use on: cart, checkout, about, faq, contact,
   delivery, service-detail, page, catalog, footer rows
   ========================================== */

.catalog-container,
.cart-container,
.footer-newsletter-container,
.footer-container,
.footer-bottom-container {
  width: 100%;
  max-width: var(--page-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-padding-x);
  padding-right: var(--page-padding-x);
}

.page-container--narrow {
  max-width: 900px;
}

.header-wrapper,
.site-footer {
  width: 100%;
  flex-shrink: 0;
}

.catalog-container,
.cart-container {
  margin-bottom: 50px;
  flex-grow: 1;
}

/* ==========================================
   4. TOASTS & BUTTON STATES
   ========================================== */
.cart-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--text-dark);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.cart-toast.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.btn-add-cart.loading {
  opacity: 0.7;
  cursor: wait;
}

/* ==========================================
   5. NAVBAR
   ========================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  padding: 20px 30px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
  box-shadow: 0 10px 25px rgba(217, 21, 87, 0.05);
}

.navbar .brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar .brand i {
  color: var(--primary);
}

.cart-badge-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.cart-badge-btn:hover {
  background-color: var(--primary-hover);
}

.badge-count {
  background: var(--accent);
  color: var(--text-dark);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* ==========================================
   6. CATALOG / PRODUCT GRID
   ========================================== */
.section-title-wrapper {
  margin-bottom: 25px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
}

.title-underline {
  width: 120px;
  height: 4px;
  background-color: var(--primary);
  border-radius: 2px;
  position: relative;
}

.title-underline::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 4px;
  background-color: var(--primary-hover);
  border-radius: 2px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.product-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(217, 21, 87, 0.08);
}

.product-image-container {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background-color: var(--bg-surface);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 4px;
}

.product-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.product-description {
  font-size: 11px;
  color: #718096;
  line-height: 1.4;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 31px;
}

.product-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-detail {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark);
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-detail:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
}

.add-cart-form {
  flex: 1;
  display: flex;
}

.btn-add-cart {
  width: 100%;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background-color: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.btn-add-cart:hover {
  background-color: var(--primary-hover);
}

/* ==========================================
   7. CART PAGE
   ========================================== */
.cart-container {
  display: flex;
  flex-direction: row;
  gap: 24px;
}

.cart-items-section {
  flex: 2;
  padding: 30px;
  background-color: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(217, 21, 87, 0.06);
  border: 1px solid rgba(217, 21, 87, 0.1);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--primary-soft);
}

.cart-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
}

.item-count {
  color: var(--primary);
  font-weight: 600;
  background-color: var(--primary-soft);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
}

.empty-cart {
  padding: 40px 0;
  text-align: center;
}

.empty-cart p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cart-table-header {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr 44px;
  padding: 20px 0 10px;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-item {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr 44px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.item-details {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.item-details img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.item-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.item-category {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.remove-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--primary-soft);
  color: var(--danger);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.remove-btn:hover {
  background: var(--danger);
  color: #fff;
}

.item-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.qty-form {
  display: inline-block;
  margin: 0;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.qty-btn:hover:not(:disabled) {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
  color: var(--primary);
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.qty-val {
  font-weight: 700;
  width: 20px;
  text-align: center;
  color: var(--text-dark);
}

.item-price,
.item-total {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
  text-align: right;
}

.item-remove {
  display: flex;
  justify-content: flex-end;
}

.continue-shopping {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.continue-shopping:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ==========================================
   8. CART SUMMARY
   ========================================== */
.cart-summary {
  flex: 1;
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(217, 21, 87, 0.06);
  border: 1px solid rgba(217, 21, 87, 0.1);
  display: flex;
  flex-direction: column;
}

.cart-summary h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 16px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.summary-row span:last-child {
  font-weight: 600;
  color: var(--text-dark);
}

.total-row {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 6px;
}

.total-row span:last-child {
  color: var(--primary);
  font-size: 22px;
}

.checkout-btn,
.checkout-link-btn {
  width: 100%;
  padding: 16px;
  background-color: var(--accent);
  color: var(--text-dark);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(253, 201, 0, 0.25);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-btn:hover:not(:disabled),
.checkout-link-btn:hover:not(.disabled) {
  background-color: var(--accent-hover);
  box-shadow: 0 6px 16px rgba(253, 201, 0, 0.35);
}

.checkout-link-btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.secure-checkout {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.secure-checkout i {
  color: var(--primary);
}

/* ==========================================
   9. FOOTER
   ========================================== */
.site-footer {
  width: 100%;
  background-color: #2d394b;
  color: #fff;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-newsletter-bar {
  background-color: var(--primary);
  padding: 30px 0;
}

.footer-newsletter-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.newsletter-text h3 {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  color: #fff;
}

.newsletter-text p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.newsletter-form {
  display: flex;
  gap: 10px;
  min-width: 380px;
}

.newsletter-form input {
  flex-grow: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 14px;
}

.newsletter-form button {
  background-color: var(--accent);
  color: var(--text-dark);
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.newsletter-form button:hover {
  background-color: var(--accent-hover);
}

.footer-main {
  padding: 60px 0 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-col ul a:hover {
  color: #fff;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-logo i {
  color: var(--primary);
  font-size: 24px;
}

.brand-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 20px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.footer-socials a:hover {
  background-color: var(--primary);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 14px;
}

.contact-item i {
  color: var(--primary);
  font-size: 16px;
  margin-top: 2px;
}

.footer-bottom {
  padding: 20px 0;
  font-size: 13px;
  color: #94a3b8;
}

.footer-bottom-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-links a:hover {
  color: #fff;
}

.payment-badges {
  display: flex;
  gap: 14px;
  font-size: 24px;
  color: #cbd5e1;
}

/* ==========================================
   10. RESPONSIVE
   ========================================== */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .cart-container {
    flex-direction: column;
  }

  .footer-newsletter-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .newsletter-form {
    width: 100%;
    min-width: 0;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --page-padding-x: 16px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-items-section,
  .cart-summary {
    padding: 20px 16px;
  }

  .cart-table-header {
    display: none;
  }

  .cart-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .item-price,
  .item-total {
    text-align: left;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-bottom-container {
    flex-direction: column;
    text-align: center;
  }
}