/* Inventory card layout with right-aligned image */
.card {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

/* Text area naturally fills remaining space */
.card > :not(.card-image) {
  flex: 1 1 auto;
}

/* Right-side image column */
.card-image {
  flex: 0 0 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

/* Product image sizing */
.card-image img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

/* Mobile: stack image below text */
@media (max-width: 650px) {
  .card {
    flex-direction: column;
  }

  .card-image {
    flex: none;
    margin-left: 0;
    margin-top: 8px;
  }

  .card-image img {
    width: 140px;
    height: 140px;
  }
}
/*
  styles.css
  Rustic inventory display styles for Kelley's Candles.
  All styling is kept here so beginners can edit colors, fonts, and spacing.
*/

:root {
  --cream: #f6efe6;
  --tan: #d8c5a5;
  --soft-brown: #8b5a2b;
  --wood: #b88a56;
  --muted-green: #7a8d79;
  --text: #3b2f2f;
  --site-title-size: 26px;
  --announce-height: 48px;
}

html, body { height: 100%; }
body{
  margin:0;
  font-family: 'Lora', serif;
  color:var(--text);
  background-color:var(--cream);
  background-image:
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 100% 40px, 40px 100%;
}
body.cart-open{ overflow:hidden; }

.container{
  max-width:960px;
  margin:0 auto;
  padding:0 16px;
}

/* Header */
.site-header{
  border-bottom:4px solid rgba(0,0,0,0.06);
  background: linear-gradient(180deg, rgba(184,138,86,0.06), transparent);
}
  .announcement{ background:var(--tan); color:var(--soft-brown); text-align:center; font-size:13px; height:var(--announce-height); line-height:var(--announce-height); padding:0 8px; box-sizing:border-box; position:sticky; top:0; z-index:89; }

  .site-header{
    position:sticky; top:var(--announce-height); z-index:90;
    background:var(--cream);
    border-bottom:1px solid rgba(0,0,0,0.06);
    box-shadow:0 2px 8px rgba(0,0,0,0.04);
  }

  .header-inner{
    display:flex;
    flex-direction:row;
    align-items:center;
    gap:12px;
    justify-content:space-between;
    padding:10px 0;
  }
.header-inner{ }
@media (max-width:699px){
  .header-inner{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
    padding:16px 0;
  }
}
.site-title{
  margin:0;
  font-family: 'Playfair Display', serif;
  font-size:var(--site-title-size);
  letter-spacing:0.6px;
  color:var(--soft-brown);
}
.brand{ display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.logo-link{ display:inline-block; line-height:0; }
.site-logo{ height:44px; width:auto; max-width:48px; object-fit:contain; display:block; }
.tagline{
  margin:0;
  color:var(--muted-green);
  font-size:14px;
}

/* Homepage image */
.homepage-image{ margin-top:12px; }
.site-image{ width:270px; height:50px; border-radius:8px; display:block; box-shadow:0 4px 12px rgba(0,0,0,0.06); object-fit:cover; }

/* Logo inside nav: override generic .site-image sizing so nav logo is readable */
.nav .site-image{ height:52px; width:auto; display:block; }

@media (max-width:520px){
  :root{ --announce-height:44px; }
  .nav .site-image{ height:38px; }
}

/* Navigation */
.nav{ display:flex; gap:12px; align-items:center; flex-wrap:nowrap; }
.nav-logo{ display:inline-flex; align-items:center; }
.nav .site-logo{ height:48px; width:auto; object-fit:contain; display:block; }
.nav-links{ margin-left:auto; display:flex; gap:12px; align-items:center; }
/* ensure cart button stays to the right of nav-links */
.nav .cart-btn{ margin-left:6px; }
.nav a{ color:var(--text); text-decoration:none; padding:6px 8px; border-radius:4px; font-size:15px; }
.nav a:hover{ background:rgba(0,0,0,0.03); }
.cart-btn{ background:transparent; border:1px solid rgba(0,0,0,0.06); padding:6px 10px; border-radius:6px; cursor:pointer; }


/* Inventory intro */
.inventory-intro{ padding:18px 0 6px 0; }
.lead{ margin:6px 0 0 0; color:#555; }

/* Filters */
.filters{ margin-top:10px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.filter-btn.active{ box-shadow: inset 0 -2px 0 rgba(0,0,0,0.08); }

/* Inventory grid and cards */
.product-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap:16px;
}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,246,240,0.96));
  border:1px solid rgba(0,0,0,0.06);
  padding:14px;
  border-radius:6px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.04);
}
/* Product card layout: stable two-column on desktop (text left, image right), stacked on mobile */
.card{
  display:grid;
  grid-template-columns: minmax(180px, 1fr) 110px;
  gap:14px;
  align-items:start;
}
/* place image in the right column */
.card-image{ grid-column:2; width:110px; height:110px; overflow:hidden; border-radius:6px; }
.card-image img{ width:100%; height:100%; object-fit:contain; display:block; }
/* ensure all other card children occupy the left column */
.card > :not(.card-image){ grid-column:1; }

/* Price/qty/button area: keep items on one row when possible, allow wrapping cleanly */
.card .meta-row{ display:flex; gap:10px; align-items:center; }
.card .meta-row + div{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.card button.add-to-cart{ white-space:nowrap; }

@media (max-width:650px){
  .card{ display:flex; flex-direction:column; }
  .card-image{ width:140px; height:140px; align-self:center; margin:-14px -14px 12px -14px; border-radius:6px 6px 0 0; }
  .card > :not(.card-image){ grid-column:auto; min-width:0; }
}
.product-name{ margin:0 0 6px 0; font-weight:700; font-size:16px; }
.desc{ margin:0 0 8px 0; color:#5d5d5d; font-size:14px; }
.meta-row{ display:flex; gap:10px; align-items:center; color:#6b6b6b; font-size:13px; }
.price{ margin:8px 0 12px 0; font-weight:700; color:var(--soft-brown); }
.btn{ background:var(--wood); color:var(--cream); border:none; padding:8px 10px; font-size:14px; border-radius:4px; cursor:pointer; }
.btn:active{ transform:translateY(1px); }

/* Cart panel styles */
.cart-overlay{ position:fixed; inset:0; background:rgba(0,0,0,0.45); z-index:1000; opacity:1; transition:opacity 200ms ease; }
.cart-panel{ position:fixed; right:0; top:0; height:100vh; width:420px; max-width:92%; background:var(--cream); box-shadow:-12px 0 36px rgba(0,0,0,0.18); z-index:1001; display:flex; flex-direction:column; overflow:hidden; transform:translateX(0); opacity:1; transition:transform 240ms ease, opacity 200ms ease; }
.cart-overlay.hidden{ display:block; opacity:0; pointer-events:none; }
.cart-panel.hidden{ display:flex; transform:translateX(100%); opacity:0; pointer-events:none; }
.cart-header{ display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-bottom:1px solid rgba(0,0,0,0.05); }
.cart-close{ background:transparent; border:none; font-size:18px; cursor:pointer; }

.cart-content{ flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; min-height:0; }
.cart-items{ padding:18px; overflow:visible; min-height:260px; }
.cart-item{ display:flex; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px dashed rgba(0,0,0,0.04); min-height:72px; align-items:flex-start; }
.cart-item .product-name{ font-size:16px; margin-bottom:6px; }
.cart-item .meta{ color:#6b6b6b; font-size:13px; }
.cart-item-info{ flex:1; min-width:0; }
.cart-item-actions{ text-align:right; min-width:140px; }
.item-price{ font-weight:700; color:var(--soft-brown); }
.item-controls{ margin-top:6px; display:flex; gap:6px; align-items:center; justify-content:flex-end; flex-wrap:wrap; }
.qty-input{ width:64px; padding:6px; border-radius:4px; border:1px solid rgba(0,0,0,0.08); background:#fff; }

.cart-footer{ padding:12px; border-top:1px solid rgba(0,0,0,0.05); }
.cart-total{ font-weight:700; margin-bottom:8px; }
.checkout-form label{ display:block; margin-bottom:8px; font-size:14px; }
.checkout-form input, .checkout-form textarea{ width:100%; padding:8px; border:1px solid rgba(0,0,0,0.08); border-radius:4px; font-family:inherit; }
.checkout-actions{ display:flex; gap:8px; justify-content:space-between; align-items:center; margin-top:8px; }
.btn.small{ padding:6px 8px; font-size:13px; }
.form-section{ padding:56px 0; }
.form-section h2{ margin:0 0 10px 0; }
.form-intro{ max-width:60ch; margin:0 0 8px 0; }
.form-note{ font-size:0.95rem; color:rgba(0,0,0,0.75); margin:0 0 16px 0; }
.form-card{ border:1px solid rgba(0,0,0,0.10); border-radius:16px; overflow:hidden; background:#ffffff; box-shadow:0 6px 18px rgba(0,0,0,0.06); }
.form-card iframe{ width:100%; height:1000px; border:0; display:block; }
.form-helper{ font-size:0.9rem; color:rgba(0,0,0,0.7); margin:0 0 12px 0; }
.form-empty{ font-size:0.95rem; color:rgba(0,0,0,0.75); margin:0 0 12px 0; }
.form-followup{ font-size:0.85rem; color:rgba(0,0,0,0.68); margin:10px 0 0 0; }
.form-followup a{ color:inherit; text-decoration:underline; }

.thank-you{ padding:56px 0; }
.thank-you-card{ background:#fffaf3; border:1px solid rgba(0,0,0,0.08); border-radius:16px; padding:24px; box-shadow:0 6px 18px rgba(0,0,0,0.06); max-width:720px; }
.thank-you-card h2{ margin-top:0; }
.thank-you-actions{ margin-top:16px; display:flex; gap:12px; flex-wrap:wrap; }
.thank-you-actions a{ text-decoration:none; color:var(--text); border:1px solid rgba(0,0,0,0.08); padding:8px 12px; border-radius:8px; background:#fff; }

/* Form-specific touches to feel rustic and approachable */
.checkout-form select{ width:100%; padding:8px; border:1px solid rgba(0,0,0,0.08); border-radius:4px; background:transparent; }
.checkout-form textarea{ background:rgba(255,255,255,0.98); }
.checkout-form label{ color:#4a3f36; }
.checkout-form input:focus, .checkout-form textarea:focus, .checkout-form select:focus{ outline:2px solid rgba(184,138,86,0.12); }

/* small screens adjustments */
@media (max-width:520px){
  .cart-panel{ width:100%; }
  .cart-items{ min-height:180px; }
  .cart-item{ flex-direction:column; }
  .cart-item-actions{ width:100%; text-align:left; display:flex; justify-content:space-between; align-items:center; gap:10px; }
  .item-controls{ justify-content:flex-start; margin-top:0; }
  .nav .site-logo{ height:40px; max-width:120px; }
}

/* Status / loading / error */
.status{ padding:18px; color:#444; }
.hidden{ display:none; }

.site-footer{ padding:16px 0; border-top:1px solid rgba(0,0,0,0.04); background:#fbf8f4; font-size:14px; }

/* Footer subtle links */
.footer-links{ text-align:center; margin-top:6px; }
.privacy-link{ color:#6b6b6b; font-size:13px; text-decoration:none; opacity:0.9; }
.privacy-link:hover{ text-decoration:underline; opacity:1; }
.care-link{ color:#6b6b6b; font-size:13px; text-decoration:none; opacity:0.9; margin-left:10px; }
.care-link:hover{ text-decoration:underline; opacity:1; }

@media (min-width:700px){
  .header-inner{ flex-direction:row; align-items:center; justify-content:space-between; }
  :root{ --site-title-size:34px; }
}

@media (max-width:520px){
  :root{ --site-title-size:22px; }
}

/* Newsletter styles */
.newsletter{ background:linear-gradient(180deg, rgba(248,244,240,0.8), rgba(255,255,255,0.6)); border-top:1px solid rgba(0,0,0,0.04); padding:20px 0; }
.newsletter h3{ margin:0 0 6px 0; font-family:'Playfair Display', serif; color:var(--soft-brown); }
.newsletter-lead{ margin:0 0 10px 0; color:#5a5249; }
.newsletter-form{ max-width:680px; }
.newsletter-form .input-row{ display:flex; gap:8px; align-items:center; }
.newsletter-form input[type="email"]{ flex:1; padding:10px 12px; border-radius:6px; border:1px solid rgba(0,0,0,0.08); font-family:inherit; }
.newsletter-form .privacy{ color:#6b6b6b; }
.newsletter-actions{ margin-top:8px; display:flex; justify-content:space-between; align-items:center; gap:8px; }
.newsletter .status{ margin-top:8px; }
.newsletter .admin-only{ background:transparent; border:1px solid rgba(0,0,0,0.06); color:var(--soft-brown); }

@media (max-width:520px){
  .newsletter-form .input-row{ flex-direction:column; align-items:stretch; }
  .newsletter-form .input-row button{ width:100%; }
}


/* --- Product card image layout (override) --- */
.card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-image {
  flex: 0 0 140px;
  width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.card-image img {
  width: 120px !important;
  height: 120px !important;
  max-width: 120px !important;
  max-height: 120px !important;
  object-fit: contain !important;
  display: block !important;
}

/* Keep the text from getting squeezed too narrow */
.card .product-name,
.card .desc,
.card .meta-row {
  min-width: 0;
}

/* Mobile: stack image below text */
@media (max-width: 650px) {
  .card {
    flex-direction: column;
  }

  .card-image {
    width: 100%;
    flex: 0 0 auto;
    margin-left: 0;
    justify-content: center;
  }

  .card-image img {
    width: 160px !important;
    height: 160px !important;
    max-width: 160px !important;
    max-height: 160px !important;
  }
}
