/* ============================================================
   Bolsos Karma · Apple.es Inspired Minimalist Design System
   ============================================================ */

:root {
  --bg-white: #ffffff;
  --bg-light: #f5f5f7;
  --bg-dark: #000000;
  --bg-dark-elevated: #161617;
  --ink: #1d1d1f;
  --ink-secondary: #6e6e73;
  --ink-tertiary: #86868b;
  --ink-on-dark: #f5f5f7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --link: #0066cc;
  --border: #d2d2d7;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --radius-card: 24px;
  --radius-sm: 14px;
  --radius-pill: 980px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-width: 1120px;
  --nav-height: 48px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-white);
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
}

.container-narrow {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 22px;
}

/* --- Global Top Ribbon & Apple Glass Navbar --- */
.karma-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.karma-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--nav-height);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.karma-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.karma-brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.karma-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.karma-nav-links a {
  font-size: 12px;
  font-weight: 400;
  color: rgba(29, 29, 31, 0.82);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.karma-nav-links a:hover,
.karma-nav-links a.active {
  color: var(--ink);
  font-weight: 500;
}

.karma-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  position: relative;
  transition: opacity 0.2s ease;
}

.icon-btn:hover {
  opacity: 0.72;
}

.bag-badge {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn {
  display: none;
}

/* Info Sub-ribbon (Apple Store style) */
.karma-ribbon {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  padding: 9px 16px;
  font-size: 12px;
  color: var(--ink);
}

.karma-ribbon a {
  color: var(--link);
  margin-left: 4px;
}

.karma-ribbon a:hover {
  text-decoration: underline;
}

/* Search Overlay */
.search-bar-drawer {
  display: none;
  background: rgba(251, 251, 253, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 22px;
}

.search-bar-drawer.open {
  display: block;
}

.search-bar-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-bar-inner input {
  flex: 1;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 18px;
  font-size: 15px;
  background: #fff;
  outline: none;
}

.search-bar-inner input:focus {
  border-color: var(--accent);
}

/* --- Typography & Buttons --- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-secondary);
  margin-bottom: 8px;
}

.hero-headline {
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-subhead {
  font-size: clamp(19px, 2.2vw, 27px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-top: 10px;
}

.section-title {
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.btn-apple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.22s ease;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: #333336;
}

.btn-light-outline {
  background: transparent;
  color: #2997ff;
  border-color: #2997ff;
}

.btn-light-outline:hover {
  background: #2997ff;
  color: #fff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.link-apple {
  color: var(--link);
  font-size: 19px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link-apple:hover {
  text-decoration: underline;
}

.link-apple-dark {
  color: #2997ff;
}

/* --- Apple Full-Bleed Hero Sections --- */
.hero-section {
  position: relative;
  text-align: center;
  padding: 64px 20px 0;
  overflow: hidden;
  margin-bottom: 12px;
}

.hero-light {
  background: var(--bg-light);
  color: var(--ink);
}

.hero-dark {
  background: var(--bg-dark);
  color: var(--ink-on-dark);
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.hero-media {
  max-width: 980px;
  margin: 24px auto 0;
}

.hero-media img {
  width: 100%;
  height: auto;
  max-height: 490px;
  object-fit: contain;
  margin: 0 auto;
}

/* --- Apple 2-Column Promo Grid --- */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 12px 12px;
}

.promo-tile {
  background: var(--bg-light);
  padding: 52px 28px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 540px;
  overflow: hidden;
  position: relative;
}

.promo-tile.tile-dark {
  background: var(--bg-dark-elevated);
  color: var(--ink-on-dark);
}

.promo-tile.tile-white {
  background: #fafafa;
}

.promo-tile h3 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.promo-tile p {
  font-size: 18px;
  color: var(--ink-secondary);
  margin-top: 8px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.promo-tile.tile-dark p {
  color: #a1a1a6;
}

.promo-tile-media {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.promo-tile-media img {
  max-height: 310px;
  width: auto;
  object-fit: contain;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.promo-tile:hover .promo-tile-media img {
  transform: scale(1.03);
}

/* --- Product Cards & Grid --- */
.section-padded {
  padding: 72px 0;
}

.section-light {
  background: var(--bg-light);
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card-apple {
  background: var(--bg-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
}

.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.product-card-img {
  background: var(--bg-light);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-card-img img {
  transform: scale(1.04);
}

.product-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: #bf4800;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.product-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-cat {
  font-size: 12px;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.product-card-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.product-card-tagline {
  font-size: 14px;
  color: var(--ink-secondary);
  margin-top: 4px;
  flex: 1;
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}

.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.16);
  display: inline-block;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.price-tag {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.price-old {
  font-size: 14px;
  color: var(--ink-tertiary);
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 400;
}

/* --- Filter Pills (Apple Store style) --- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.pill-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-tab {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  background: var(--bg-light);
  color: var(--ink);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.pill-tab:hover {
  background: #e8e8ed;
}

.pill-tab.active {
  background: var(--ink);
  color: #fff;
}

/* --- Product Detail Page (Apple Store Configurator style) --- */
.pdp-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 54px;
  align-items: start;
}

.pdp-gallery {
  position: sticky;
  top: 72px;
}

.pdp-main-img {
  background: var(--bg-light);
  border-radius: var(--radius-card);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pdp-thumb {
  width: 78px;
  height: 62px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--bg-light);
  padding: 0;
}

.pdp-thumb.active {
  border-color: var(--accent);
}

.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.color-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.color-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.color-option.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.spec-list {
  margin-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.spec-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

/* --- Forms & Alerts --- */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.alert-apple {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  margin-bottom: 20px;
}

.alert-success {
  background: #eaf8ee;
  color: #146c2e;
  border: 1px solid #b7e4c7;
}

.alert-danger {
  background: #fef0f0;
  color: #b42318;
  border: 1px solid #fecdca;
}

.alert-info {
  background: #eef6ff;
  color: #09529b;
  border: 1px solid #c2e0ff;
}

/* --- Bag & Checkout --- */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: start;
}

.bag-item {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.bag-item-img {
  width: 108px;
  height: 82px;
  border-radius: 12px;
  background: var(--bg-light);
  overflow: hidden;
}

.bag-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bank-box {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 15px;
}

.bank-row:last-child {
  border-bottom: none;
}

.copy-chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}

.copy-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-warning { background: #fff4e5; color: #9a5b00; }
.badge-info { background: #eef6ff; color: #09529b; }
.badge-success { background: #eaf8ee; color: #146c2e; }
.badge-primary { background: #f0edff; color: #4c28b5; }
.badge-danger { background: #fef0f0; color: #b42318; }
.badge-neutral { background: #f2f2f7; color: #3a3a3c; }

/* --- Reassurance Strip --- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  text-align: center;
}

.trust-item h4 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 12px;
}

.trust-item p {
  font-size: 14px;
  color: var(--ink-secondary);
  margin-top: 6px;
}

/* --- Footer (Apple.es style) --- */
.karma-footer {
  background: var(--bg-light);
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.5;
  padding: 44px 0 32px;
  border-top: 1px solid var(--border-subtle);
}

.footer-notes {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

.footer-cols h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.footer-cols ul {
  list-style: none;
}

.footer-cols li {
  margin-bottom: 6px;
}

.footer-cols a:hover {
  text-decoration: underline;
  color: var(--ink);
}

.footer-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Subtle Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .pdp-grid { grid-template-columns: 1fr; gap: 32px; }
  .pdp-gallery { position: static; }
  .checkout-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.notify-transfer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

@media (max-width: 740px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .notify-transfer-grid { grid-template-columns: 1fr; }
  .karma-nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(251, 251, 253, 0.98);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .karma-nav-links.open { display: flex; }
  .karma-nav-links a { font-size: 17px; }
  .mobile-menu-btn { display: inline-flex; }
  .promo-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .bag-item { grid-template-columns: 84px 1fr; }
  .bag-item-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
}
