/* Storefront styles using the Philippine flag colour palette. */
:root {
  --ph-blue: #0038a8;
  --ph-red: #ce1126;
  --ph-yellow: #fcd116;
  --gray-100: #f5f7fb;
  --gray-300: #e5e7eb;
  --gray-600: #4b5563;
  --dark: #1f2937;
  --white: #ffffff;
  --success: #0a7a55;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--gray-100);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

header {
  background: linear-gradient(135deg, rgba(0, 56, 168, 0.95), rgba(206, 17, 38, 0.9));
  color: var(--white);
  padding: 18px 20px;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.16);
}

.nav-links .badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-weight: 700;
  padding: 4px 10px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

.main {
  max-width: 1180px;
  margin: 30px auto 60px;
  padding: 0 20px;
  flex: 1 0 auto;
}

.hero {
  background: var(--white);
  border-radius: 20px;
  padding: 30px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(0, 56, 168, 0.08);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(252, 209, 22, 0.2);
  color: var(--ph-blue);
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 600;
  font-size: 0.85rem;
}

.product-grid {
  margin-top: 32px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.product-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-card .content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.price {
  font-weight: 700;
  color: var(--ph-red);
  font-size: 1.1rem;
}

.product-detail-card {
  padding: 30px;
}

.product-detail-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: flex-start;
}

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

.product-main-image {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.product-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.product-thumbnails .thumb {
  border: 2px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.product-thumbnails .thumb img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.product-thumbnails .thumb.active {
  border-color: var(--ph-blue);
}

.product-info .price {
  font-size: 2rem;
}

.product-description {
  color: var(--gray-600);
  line-height: 1.6;
}

.product-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.product-video {
  margin-top: 18px;
  width: 100%;
}
.product-video .video-frame {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  background: #000;
  min-height: 340px;
}
.product-video .video-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--ph-blue);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(0, 56, 168, 0.18);
}

.btn-accent {
  background: var(--ph-red);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(206, 17, 38, 0.18);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--ph-blue);
  color: var(--ph-blue);
}

.btn:active {
  transform: translateY(1px);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  margin-bottom: 16px;
}

.card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-300);
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quantity-control button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  font-size: 1rem;
  cursor: pointer;
}

.quantity-control input {
  width: 60px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid var(--gray-300);
  padding: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(0, 56, 168, 0.1);
  color: var(--ph-blue);
}

.alert {
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(206, 17, 38, 0.08);
  color: var(--ph-red);
  margin-bottom: 16px;
}

footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.72);
  padding: 24px 20px;
  text-align: center;
  margin-top: auto;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  font-size: 1rem;
  background: var(--white);
  transition: border-color 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--ph-blue);
  box-shadow: 0 0 0 4px rgba(0, 56, 168, 0.12);
}

.radio-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--gray-300);
  cursor: pointer;
}

.status-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.status-timeline li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 16px;
}

.status-timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ph-yellow);
}

.status-timeline li.completed::before {
  background: var(--success);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-card {
  background: var(--white);
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  padding: 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.modal-card h2 {
  margin-top: 0;
  color: var(--ph-blue);
}

.modal-card p {
  color: var(--gray-600);
  margin-bottom: 18px;
}

.modal-card .btn {
  width: 100%;
}

.spinner {
  width: 54px;
  height: 54px;
  border: 6px solid rgba(0, 56, 168, 0.15);
  border-top-color: var(--ph-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 18px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-banner {
  background: rgba(0, 56, 168, 0.08);
  border: 1px solid rgba(0, 56, 168, 0.2);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  color: var(--ph-blue);
  font-weight: 600;
}

.modal-card img.modal-qr {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--gray-300);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  margin: 0 auto 16px;
  display: block;
}

.modal-card iframe {
  width: 100%;
  height: 60vh;
  border: 0;
  border-radius: 16px;
  margin-bottom: 16px;
}
