/* =====================================================
   GLAMORA - Main Stylesheet
   ===================================================== */

:root {
  --bg: #fdfbf8;
  --card-bg: #ffffff;
  --accent: #a1e3dd;
  --accent-soft: #e5f7f5;
  --text-main: #2b2b2b;
  --text-soft: #969696;
  --border-soft: #ece7df;
  --danger: #c8574d;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  padding: 0;
}

.app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 80px;
}

h1, h2, h3 {
  font-family: "Playfair Display", serif;
  letter-spacing: 0.2px;
}

h1 { font-size: 32px; margin-bottom: 16px; }
h2 { font-size: 20px; margin-bottom: 10px; }
h3 { font-size: 18px; }

/* =====================================================
   COMMON PAGE LAYOUT
   ===================================================== */

.page-padding {
  padding: 16px 16px 0 16px;
}

/* =====================================================
   TOP SEARCH + CART
   ===================================================== */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 10px 16px 6px 16px;
  background: linear-gradient(to bottom, var(--bg) 80%, rgba(253, 251, 248, 0));
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-bar {
  flex: 1;
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-bar input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--text-main);
}

.search-icon {
  font-size: 16px;
  color: var(--text-soft);
}

.cart-btn {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  border: none;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  font-size: 18px;
  cursor: pointer;
}

/* =====================================================
   HERO BANNER
   ===================================================== */

.hero-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-img {
  width: 100%;
  border-radius: 14px;
  background: linear-gradient(120deg, #f7e4d5, #f6d4c3);
  aspect-ratio: 16/9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  color: #4d352d;
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.hero-title {
  font-size: 18px;
  font-weight: 600;
}

.hero-sub {
  font-size: 13px;
  color: var(--text-soft);
}

.hero-btn {
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #d3c5b5;
  background: transparent;
  color: #5d3e32;
  font-size: 14px;
  cursor: pointer;
  align-self: flex-start;
}

/* =====================================================
   SECTION TITLE ROW
   ===================================================== */

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 10px;
}

.section-title-row span {
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
}

/* =====================================================
   PRODUCT CARDS
   ===================================================== */

.product-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.product-row::-webkit-scrollbar {
  height: 4px;
}

.product-row::-webkit-scrollbar-thumb {
  background: #e0d7cc;
  border-radius: 999px;
}

.product-card {
  scroll-snap-align: start;
  min-width: 165px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.product-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f1eb;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-soft);
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.product-brand {
  font-size: 11px;
  color: var(--text-soft);
}

.product-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.product-price-now {
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

.product-price-old {
  font-size: 11px;
  text-decoration: line-through;
  color: var(--danger);
}

.product-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
}

.see-all-btn {
  margin: 10px 0 4px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--card-bg);
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
}

/* =====================================================
   CATEGORY PAGE
   ===================================================== */

.category-heading {
  margin: 6px 0 10px;
}

.brands-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  cursor: pointer;
}

.brands-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brands-main {
  font-size: 16px;
  font-weight: 500;
}

.brands-sub {
  font-size: 13px;
  color: var(--text-soft);
}

.chevron {
  font-size: 18px;
  color: var(--text-soft);
}

.category-section-title {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card-bg);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.category-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-thumb {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  overflow: hidden;
  background: #f7f2ee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-soft);
}

.category-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.category-name {
  font-size: 15px;
  font-weight: 500;
}

/* =====================================================
   CATEGORY DETAIL / GRIDS
   ===================================================== */

.category-detail-header {
  margin-bottom: 10px;
}

.category-detail-sub {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 16px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.category-images {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.category-images img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
}

/* =====================================================
   PLACEHOLDER BLOCKS
   ===================================================== */

.placeholder-block {
  margin-top: 40px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.placeholder-block p {
  font-size: 14px;
  color: var(--text-soft);
  margin-top: 6px;
}

/* =====================================================
   BOTTOM NAV
   ===================================================== */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
  padding-top: 4px;
  background: transparent;
  pointer-events: none;
}

.bottom-nav-inner {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 8px 20px 10px;
  pointer-events: auto;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--text-soft);
  cursor: pointer;
  flex: 1;
  text-decoration: none;
}

.nav-item span.icon {
  font-size: 20px;
}

.nav-item.active {
  color: var(--text-main);
}

.nav-center-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  border: 6px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

/* =====================================================
   PRODUCT PAGE
   ===================================================== */

.product-page-img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3/4;
  background: #f4f1eb;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-soft);
}

.product-page-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.product-page-brand {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.product-page-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-page-price {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.product-page-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.btn-primary {
  flex: 1;
  border-radius: 999px;
  border: none;
  padding: 12px 18px;
  font-size: 14px;
  cursor: pointer;
  background: #2e2e2e;
  color: #fff;
}

.btn-secondary {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 12px 18px;
  font-size: 14px;
  cursor: pointer;
  background: var(--card-bg);
  color: var(--text-main);
}

.back-link {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

/* =====================================================
   TOP RIGHT BUTTON (Cart shortcut)
   ===================================================== */

.top-right-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  background: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  z-index: 10;
}

.top-right-btn i {
  font-size: 20px;
  color: black;
}

/* =====================================================
   AUTH PAGES (Login / Signup)
   ===================================================== */

.form-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  margin-top: 20px;
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.input-row label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.input-row input {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--card-bg);
  font-size: 14px;
  outline: none;
  box-shadow: var(--shadow-soft);
}

.login-btn {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  border: none;
  background: #2e2e2e;
  color: white;
  font-size: 15px;
  cursor: pointer;
}

.switch-text {
  text-align: center;
  font-size: 13px;
  margin-top: 12px;
}

.switch-text a {
  color: var(--text-main);
  font-weight: 600;
  text-decoration: none;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
  text-align: center;
  padding: 1px 0;
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 1px;
  padding-bottom: 10px;
}

/* =====================================================
   MEDIA QUERIES
   ===================================================== */

@media (min-width: 700px) {
  body {
    padding: 20px 0;
  }
}
