@import url('/_gatewa/fonts/css?family=Plus%20Jakarta%20Sans');

:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg: var(--gatewa-background, #fafafa);
  --surface: #ffffff;
  --surface-subtle: #f4f4f5;
  --text: var(--gatewa-font, #27272a);
  --text-muted: #71717a;
  --text-light: #a1a1aa;
  --primary: var(--gatewa-primary, #18181b);
  --primary-contrast: #ffffff;
  --btn-bg: var(--gatewa-buttons, #18181b);
  --btn-text: #ffffff;
  --border: var(--gatewa-borders, #e4e4e7);
  --border-focus: #18181b;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --max-w: 1160px;
  --header-h: 72px;
  --transition: 0.2s ease;
}

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

[hidden] {
  display: none !important;
}

[data-gatewa-copywriting-region]:empty {
  display: none !important;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--primary);
  color: var(--primary-contrast);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  height: var(--header-h);
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--primary);
  min-width: 0;
  flex-shrink: 1;
}

.brand-logo {
  max-height: 38px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.brand-logo-fallback {
  display: inline-block;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 6px 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-cart:hover {
  background: #e4e4e7;
  border-color: #d4d4d8;
}

.cart-badge {
  background: var(--primary);
  color: var(--primary-contrast);
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  display: none;
  padding: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 90;
  box-shadow: var(--shadow-lg);
}

.mobile-menu .nav-link {
  font-size: 1.1rem;
  padding: 8px 0;
}

/* Main layout */
main {
  flex: 1;
}

.section {
  padding: 48px 0;
}

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

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Cards Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #d4d4d8;
}

.card-media {
  position: relative;
  background: var(--surface-subtle);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

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

.card-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  width: 100%;
  height: 100%;
  background: #f8fafc;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.price-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.price-strike {
  font-size: 0.95rem;
  text-decoration: line-through;
  color: var(--text-muted);
  margin-left: 6px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-actions .btn {
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 600;
  transition: all var(--transition);
  text-align: center;
  user-select: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid transparent;
}

.btn-primary:hover:not(:disabled) {
  background: #27272a;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: #d4d4d8;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

/* Options selector */
.options-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.options-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.options-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-pill {
  position: relative;
}

.option-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-pill label {
  display: block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.option-pill input:checked + label {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}

.option-pill input:focus-visible + label {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Detail Pages */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 48px 0;
}

.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-main-img {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  aspect-ratio: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.detail-thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.detail-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
}

.detail-thumb.active {
  border-color: var(--primary);
}

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

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.detail-price-box {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.detail-price-box .price-val {
  font-size: 1.75rem;
}

.detail-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-line;
}

.detail-meta-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.detail-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.qty-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text);
}

.qty-val {
  min-width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.back-nav {
  margin-bottom: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.back-link:hover {
  color: var(--text);
}

/* Cart Drawer */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.cart-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  z-index: 1001;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-close {
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}
.cart-close:hover {
  color: var(--text);
  background: var(--surface-subtle);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  gap: 12px;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.cart-item-opts {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 800;
}

/* Toast / Alerts */
.feedback-msg {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feedback-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.feedback-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Policy and FAQ items */
.policy-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-a {
  padding: 0 20px 16px;
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.5;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-heading {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 840px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .site-header {
    height: 64px;
  }
  .header-inner {
    gap: 10px;
  }
  .brand {
    font-size: 1.1rem;
    max-width: calc(100% - 130px);
  }
  .brand-logo {
    max-height: 32px;
    max-width: 120px;
  }
  .brand-logo-fallback {
    font-size: 1.1rem;
  }
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}
