/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy:    #0f1111;
  --panel:   #232f3e;
  --panel2:  #37475a;
  --dark:    #131a22;
  --orange:  #febd69;
  --orange2: #f3a847;
  --teal:    #007185;
  --teal2:   #c7511f;
  --white:   #ffffff;
  --off-white: #f3f3f3;
  --text-dim: #cccccc;
  --text-mute:#999999;
  --radius:  4px;
  --transition: 0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Amazon Ember', Arial, sans-serif;
  font-size: 14px;
  color: #111;
  background: #e3e6e6;
  min-width: 320px;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  flex-wrap: wrap;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 8px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  color: var(--white);
  transition: border-color var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.nav-btn:hover { border-color: var(--white); }

/* Logo */
.nav-logo { padding: 4px 6px; }
.logo {
  background-image: url('amazon_logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 110px;
  height: 40px;
}
.footer-logo { width: 90px; height: 34px; }

/* Deliver to */
.nav-address { min-width: 110px; }
.nav-label   { font-size: 11px; color: var(--text-dim); }
.nav-bold    { font-size: 13px; font-weight: 700; }
.nav-row     { display: flex; align-items: center; gap: 4px; }
.nav-icon    { font-size: 16px; }
.caret       { font-size: 10px; }

/* Search */
.nav-search {
  flex: 1;
  display: flex;
  align-items: center;
  height: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 200px;
  max-width: 700px;
  box-shadow: 0 0 0 2px transparent;
  transition: box-shadow var(--transition);
}
.nav-search:focus-within { box-shadow: 0 0 0 2px var(--orange2); }

.search-select {
  height: 100%;
  background: var(--off-white);
  border: none;
  border-right: 1px solid #cdcdcd;
  padding: 0 6px;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  max-width: 80px;
}

.search-input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 15px;
  background: var(--white);
}

.search-btn {
  width: 46px;
  height: 100%;
  background: var(--orange);
  border: none;
  font-size: 18px;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.search-btn:hover { background: var(--orange2); }

/* Language */
.nav-lang {
  flex-direction: row;
  align-items: center;
  gap: 4px;
}
.lang-select {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}
.lang-select option { color: var(--navy); background: var(--white); }

/* Cart */
.nav-cart {
  flex-direction: row;
  align-items: flex-end;
  gap: 4px;
  position: relative;
}
.cart-icon { font-size: 26px; }
.cart-label { font-size: 13px; font-weight: 700; align-self: flex-end; margin-bottom: 3px; }
.cart-count {
  position: absolute;
  top: 4px;
  left: 20px;
  background: var(--orange2);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== PANEL ===== */
.panel {
  background: var(--panel);
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 38px;
  gap: 4px;
  overflow: hidden;
}

.panel-all {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 2px solid transparent;
  color: var(--white);
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: border-color var(--transition);
  white-space: nowrap;
}
.panel-all:hover { border-color: var(--white); }

.panel-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow: hidden;
}
.panel-links a {
  padding: 4px 10px;
  font-size: 13px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: border-color var(--transition);
  white-space: nowrap;
}
.panel-links a:hover { border-color: var(--white); }

.panel-promo {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 4px 8px;
  transition: border-color var(--transition);
}
.panel-promo:hover { border-color: var(--white); }

/* ===== HERO ===== */
.hero {
  background-image: url('hero_image.jpg');
  background-size: cover;
  background-position: center;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
}

.hero-banner {
  width: 100%;
  background: rgba(255,255,255,0.94);
  text-align: center;
  padding: 12px 16px;
  font-size: 13px;
}
.hero-banner a { color: var(--teal); font-weight: 500; margin-left: 4px; }
.hero-banner a:hover { text-decoration: underline; color: var(--teal2); }

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 20px 14px;
  background: #e3e6e6;
  max-width: 1600px;
  margin: 0 auto;
}

.product-card {
  background: var(--white);
  border-radius: 4px;
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition);
}
.product-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.14); }

.product-card h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #0f1111;
  line-height: 1.3;
}

.card-img {
  flex: 1;
  min-height: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f5f5;
  border-radius: 3px;
}

.shop-now {
  display: inline-block;
  margin-top: 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 500;
  transition: color var(--transition), text-decoration var(--transition);
}
.shop-now:hover { text-decoration: underline; color: var(--teal2); }

/* ===== FOOTER ===== */
footer { background: var(--dark); }

/* Back to top */
.back-to-top {
  width: 100%;
  background: var(--panel2);
  color: var(--white);
  border: none;
  padding: 14px;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition: background var(--transition);
}
.back-to-top:hover { background: #455a6e; }

/* Footer links */
.footer-links {
  background: var(--panel);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 60px 32px;
}

.footer-col h3 {
  color: var(--white);
  font-size: 15px;
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 8px;
  transition: color var(--transition), text-decoration var(--transition);
}
.footer-col a:hover { text-decoration: underline; color: var(--white); }

/* Footer brand bar */
.footer-brand {
  background: var(--panel);
  border-top: 1px solid #3a4553;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  flex-wrap: wrap;
}

.footer-selects { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-sel-btn {
  background: transparent;
  border: 1px solid #6b7d8e;
  color: var(--text-dim);
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color var(--transition), color var(--transition);
}
.footer-sel-btn:hover { border-color: var(--white); color: var(--white); }

/* Services grid */
.footer-services {
  background: var(--dark);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  padding: 24px 40px 28px;
  border-top: 1px solid #222d3a;
}

.service-group {
  padding: 14px 12px;
}
.service-name {
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  cursor: pointer;
}
.service-name:hover { text-decoration: underline; }
.service-group span {
  color: var(--text-mute);
  font-size: 11px;
  line-height: 1.5;
}

/* Copyright */
.footer-copyright {
  background: var(--dark);
  border-top: 1px solid #222d3a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 20px;
}
.footer-copyright a {
  color: var(--text-dim);
  font-size: 12px;
  transition: text-decoration var(--transition);
}
.footer-copyright a:hover { text-decoration: underline; color: var(--white); }
.footer-copyright p { color: var(--text-mute); font-size: 12px; width: 100%; text-align: center; margin-top: 4px; }

/* ===== RESPONSIVE ===== */

/* Large tablets / small desktops */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-services { grid-template-columns: repeat(4, 1fr); }
  .footer-links { padding: 32px 30px; }
}

/* Tablets */
@media (max-width: 860px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .footer-services { grid-template-columns: repeat(3, 1fr); }

  /* Hide some navbar items on tablet */
  .nav-address, .nav-lang, .nav-orders { display: none; }

  .navbar { gap: 8px; }
  .nav-search { max-width: 100%; }

  .panel-links a:nth-child(n+4) { display: none; }
  .panel-promo { display: none; }
}

/* Mobile */
@media (max-width: 560px) {
  .navbar {
    flex-wrap: wrap;
    padding: 8px;
    gap: 6px;
  }

  .nav-logo { order: 1; }
  .nav-account { order: 2; margin-left: auto; }
  .nav-cart { order: 3; }
  .nav-search {
    order: 4;
    width: 100%;
    max-width: 100%;
  }

  .nav-address, .nav-lang, .nav-orders { display: none; }

  .panel { position: relative; gap: 0; }
  .panel-links {
    display: none;
    position: absolute;
    top: 38px;
    left: 0;
    width: 100%;
    background: var(--panel2);
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 0;
    z-index: 100;
    box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  }
  .panel-links.open { display: flex; }
  .panel-links a {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .panel-promo { display: none; }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
  }
  .product-card h2 { font-size: 14px; }
  .card-img { min-height: 140px; }

  .hero { min-height: 200px; }

  .footer-links {
    grid-template-columns: 1fr 1fr;
    padding: 24px 16px;
    gap: 16px;
  }
  .footer-services { grid-template-columns: repeat(2, 1fr); padding: 16px; }

  .footer-copyright { gap: 10px; padding: 14px 16px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
  .footer-services { grid-template-columns: 1fr 1fr; }
}
