/* ===========================
   Loganville Flowers Storefront
   Colors: White + Tangerine + Pink + Sand
   Fonts: DM Serif Display + Plus Jakarta Sans
   =========================== */

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

:root {
  --white: #FFFFFF;
  --cream: #FBF8F3;
  --tangerine: #E8772E;
  --tangerine-dark: #D06822;
  --tangerine-light: #FFF5EE;
  --pink: #E84B8A;
  --sand: #D4B896;
  --sand-light: #F0E6D6;
  --deep-green: #1B3A2D;
  --sage: #5C7A6B;
  --dark: #1A1A1A;
  --gray-100: #F7F7F7;
  --gray-200: #EEEEEE;
  --gray-300: #DDDDDD;
  --gray-500: #999999;
  --gold: #C4965A;
  --blush: #E8CFC0;
  --success-bg: #E8F5E9;
  --success: #2E7D32;
  --error-bg: #FFEBEE;
  --error: #C62828;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--white);
  color: var(--dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: 'DM Serif Display', serif; }

/* ============ NAV ============ */
.shop-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.shop-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  color: var(--deep-green);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-icon { color: var(--tangerine); font-size: 1.5rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  color: var(--sage);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--deep-green); }
.cart-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
}
.cart-badge {
  background: var(--tangerine);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.cart-badge.hidden { display: none; }
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: 0.3s;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0 2rem 1rem;
  gap: 0;
}
.mobile-nav a {
  color: var(--sage);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.mobile-nav.open { display: flex; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-inner { padding: 0.75rem 1.5rem; }
}

/* ============ SHOP HERO ============ */
.shop-hero {
  background: linear-gradient(135deg, var(--cream) 0%, var(--sand-light) 100%);
  padding: 4rem 2rem;
  text-align: center;
}
.shop-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--deep-green);
  margin-bottom: 0.75rem;
}
.shop-hero h1 em { font-style: italic; color: var(--tangerine); }
.shop-hero p {
  color: var(--sage);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}
.delivery-badges {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.delivery-badge {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
  color: var(--sage);
  font-weight: 500;
}
.delivery-badge strong { color: var(--deep-green); }

@media (max-width: 768px) {
  .shop-hero { padding: 3rem 1.5rem; }
}

/* ============ PRODUCT GRID ============ */
.products-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--deep-green);
  margin-bottom: 1.5rem;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(27, 58, 45, 0.1);
}
.product-card-link {
  text-decoration: none;
  color: inherit;
}
.product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--gray-100);
}
.product-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  color: var(--deep-green);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}
.product-desc {
  font-size: 0.8rem;
  color: var(--sage);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--deep-green);
}
.btn-add-cart {
  background: var(--tangerine);
  color: white;
  border: none;
  border-radius: 100px;
  padding: 0.5rem 1.1rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-add-cart:hover { background: var(--tangerine-dark); }
.btn-add-cart:active { transform: scale(0.95); }

@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .products-section { padding: 2rem 1.5rem 3rem; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}

/* ============ PRODUCT DETAIL ============ */
.product-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.product-detail-img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--gray-100);
}
.product-detail-info { padding-top: 0.5rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--sage);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--deep-green); }
.product-detail-info h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--deep-green);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.product-detail-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--tangerine);
  margin-bottom: 1.5rem;
}
.product-detail-desc {
  color: var(--sage);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.quantity-selector label {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.9rem;
}
.qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  overflow: hidden;
}
.qty-btn {
  background: var(--gray-100);
  border: none;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--dark);
  font-family: inherit;
  transition: background 0.15s;
}
.qty-btn:hover { background: var(--gray-200); }
.qty-value {
  width: 50px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-left: 1px solid var(--gray-300);
  border-right: 1px solid var(--gray-300);
  height: 42px;
  font-family: inherit;
  background: var(--white);
}
.btn-add-cart-lg {
  background: var(--tangerine);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
  font-family: inherit;
}
.btn-add-cart-lg:hover { background: var(--tangerine-dark); }
.btn-add-cart-lg:active { transform: scale(0.98); }
.delivery-info-box {
  margin-top: 2rem;
  background: var(--cream);
  border-radius: 12px;
  padding: 1.25rem;
}
.delivery-info-box h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--deep-green);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.delivery-option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.85rem;
}
.delivery-option-row + .delivery-option-row {
  border-top: 1px solid var(--gray-200);
}
.delivery-option-label { color: var(--dark); font-weight: 500; }
.delivery-option-price { color: var(--tangerine); font-weight: 700; }
.delivery-option-cutoff { color: var(--sage); font-size: 0.75rem; }

@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .product-detail-info h1 { font-size: 1.5rem; }
}

/* ============ CART PAGE ============ */
.cart-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}
.cart-page > h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--deep-green);
  margin-bottom: 2rem;
}
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  align-items: center;
}
.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--gray-100);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-weight: 600;
  color: var(--deep-green);
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
}
.cart-item-price {
  color: var(--tangerine);
  font-weight: 700;
  font-size: 0.95rem;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.cart-item-qty button {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-qty button:hover { background: var(--gray-200); }
.cart-item-qty span { font-weight: 600; min-width: 20px; text-align: center; font-size: 0.9rem; }
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}
.cart-item-total {
  font-weight: 700;
  color: var(--deep-green);
  font-size: 1rem;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 0.75rem;
  font-family: inherit;
  text-decoration: underline;
  transition: color 0.15s;
}
.cart-item-remove:hover { color: var(--error); }
.cart-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--sage);
  grid-column: 1 / -1;
}
.cart-empty h2 {
  font-family: 'DM Serif Display', serif;
  color: var(--deep-green);
  margin-bottom: 0.5rem;
}
.cart-empty a {
  display: inline-block;
  margin-top: 1.25rem;
  background: var(--tangerine);
  color: white;
  text-decoration: none;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
}
.cart-empty a:hover { background: var(--tangerine-dark); }

/* ============ CART SIDEBAR ============ */
.cart-sidebar {
  background: var(--cream);
  border-radius: 16px;
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}
.cart-sidebar h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--deep-green);
  margin-bottom: 1.25rem;
}

/* Delivery check */
.delivery-check {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.delivery-check label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.4rem;
}
.zip-input-row {
  display: flex;
  gap: 0.5rem;
}
.zip-input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--white);
}
.zip-input:focus { outline: 2px solid var(--tangerine); border-color: transparent; }
.btn-check-zip {
  background: var(--deep-green);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-check-zip:hover { background: #244A39; }
.delivery-result {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  line-height: 1.5;
}
.delivery-result.success { background: var(--success-bg); color: var(--success); }
.delivery-result.error { background: var(--error-bg); color: var(--error); }

/* Delivery options */
.delivery-options {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.delivery-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--white);
}
.delivery-option:hover { border-color: var(--sage); }
.delivery-option.selected { border-color: var(--tangerine); background: var(--tangerine-light); }
.delivery-option input[type="radio"] { display: none; }
.delivery-option-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.delivery-option.selected .delivery-option-dot { border-color: var(--tangerine); }
.delivery-option.selected .delivery-option-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--tangerine);
  border-radius: 50%;
}
.delivery-option-details { flex: 1; }
.delivery-option-name { font-weight: 600; font-size: 0.85rem; color: var(--dark); }
.delivery-option-meta { font-size: 0.7rem; color: var(--sage); margin-top: 0.1rem; }
.delivery-option-cost { font-weight: 700; color: var(--tangerine); font-size: 0.9rem; flex-shrink: 0; }

/* Order summary */
.order-summary { margin-bottom: 1.25rem; }
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: var(--dark);
}
.summary-row.total {
  border-top: 2px solid rgba(0,0,0,0.08);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--deep-green);
}

/* Customer form */
.customer-form {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 1.25rem;
}
.customer-form h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--deep-green);
  margin-bottom: 1rem;
}
.form-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.form-group {
  flex: 1;
  margin-bottom: 0.6rem;
}
.form-row .form-group { margin-bottom: 0; }
.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.2rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--tangerine);
  border-color: transparent;
}
.form-group textarea { resize: vertical; min-height: 60px; }
.btn-checkout {
  background: var(--tangerine);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.75rem;
  width: 100%;
  font-family: inherit;
}
.btn-checkout:hover { background: var(--tangerine-dark); }
.btn-checkout:active { transform: scale(0.98); }
.btn-checkout:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
  transform: none;
}
.checkout-note {
  font-size: 0.7rem;
  color: var(--sage);
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-page { padding: 1.5rem; }
  .cart-sidebar { position: static; }
}

/* ============ SUCCESS PAGE ============ */
.success-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}
.success-icon { font-size: 4rem; margin-bottom: 1.25rem; }
.success-page h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--deep-green);
  margin-bottom: 0.75rem;
}
.success-page > p {
  color: var(--sage);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}
.success-details {
  background: var(--cream);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: left;
}
.success-details h3 {
  font-family: 'DM Serif Display', serif;
  color: var(--deep-green);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}
.success-details p {
  font-size: 0.9rem;
  color: var(--sage);
  margin-bottom: 0.35rem;
  line-height: 1.6;
}
.btn-continue-shopping {
  display: inline-block;
  background: var(--tangerine);
  color: white;
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
  margin-top: 0.5rem;
}
.btn-continue-shopping:hover { background: var(--tangerine-dark); }

/* ============ FOOTER ============ */
.shop-footer {
  background: var(--deep-green);
  color: rgba(255,255,255,0.8);
  margin-top: 3rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  color: white;
  margin-bottom: 0.5rem;
}
.footer-brand p { font-size: 0.85rem; line-height: 1.5; }
.footer-info { display: flex; gap: 3rem; }
.footer-info strong {
  display: block;
  color: white;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.footer-info p { font-size: 0.85rem; margin-bottom: 0.25rem; }
.footer-info a { color: var(--gold); text-decoration: none; }
.footer-info a:hover { text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 2rem;
  text-align: center;
}
.footer-bottom p { font-size: 0.8rem; }
.footer-bottom a { color: var(--gold); text-decoration: none; }

@media (max-width: 768px) {
  .footer-inner { flex-direction: column; padding: 2rem 1.5rem; }
  .footer-info { flex-direction: column; gap: 1.5rem; }
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--deep-green);
  color: white;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 480px) {
  .toast { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; text-align: center; }
}

/* ============ LOADING SPINNER ============ */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
