/* ============================================
   CRAFTORA STUDIO LLC - Global Stylesheet
   ============================================ */

:root {
  --color-primary: #2c1810;
  --color-secondary: #8b6f47;
  --color-accent: #b8956a;
  --color-bg: #fdfbf7;
  --color-bg-alt: #f5efe6;
  --color-text: #2c1810;
  --color-muted: #6b5d4f;
  --color-border: #e8dfd2;
  --color-sale: #c0392b;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

a { color: var(--color-secondary); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--color-primary); }

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

.btn { border-radius: 0; padding: .75rem 1.75rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; font-size: .85rem; transition: all .3s ease; }
.btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-secondary); border-color: var(--color-secondary); }
.btn-outline-primary { background: transparent; border: 1px solid var(--color-primary); color: var(--color-primary); }
.btn-outline-primary:hover { background: var(--color-primary); color: #fff; }
.btn-accent { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.btn-accent:hover { background: var(--color-secondary); border-color: var(--color-secondary); color: #fff; }

/* ============ TOP BAR ============ */
.top-bar {
  background: var(--color-primary);
  color: #fff;
  font-size: .8rem;
  padding: .5rem 0;
  letter-spacing: .05em;
}
.top-bar a { color: #fff; }
.top-bar a:hover { color: var(--color-accent); }

/* ============ HEADER / NAVBAR ============ */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1020;
}
.navbar { padding: 1rem 0; }
.navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: .08em;
  color: var(--color-primary) !important;
}
.navbar-brand small {
  display: block;
  font-family: var(--font-body);
  font-size: .65rem;
  letter-spacing: .25em;
  color: var(--color-muted);
  font-weight: 400;
  margin-top: -2px;
}
.navbar .nav-link {
  color: var(--color-primary) !important;
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .5rem 1rem !important;
  position: relative;
}
.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: all .3s ease;
  transform: translateX(-50%);
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after { width: 30px; }

.cart-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cart-badge:hover { background: var(--color-secondary); color: #fff; }
.cart-count {
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44,24,16,.55) 0%, rgba(44,24,16,.25) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 5rem 0;
}
.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.1;
}
.hero-content .lead {
  font-size: 1.15rem;
  max-width: 540px;
  margin-bottom: 2rem;
  opacity: .95;
}
.hero-tag {
  display: inline-block;
  padding: .35rem 1rem;
  border: 1px solid rgba(255,255,255,.6);
  font-size: .75rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* ============ SECTION HEADERS ============ */
.section { padding: 5rem 0; }
.section-tight { padding: 3rem 0; }
.section-alt { background: var(--color-bg-alt); }
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title .eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: .8rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: .75rem;
}
.section-title h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin: 0;
}
.section-title p {
  max-width: 620px;
  margin: 1rem auto 0;
  color: var(--color-muted);
}

/* ============ PRODUCT CARD ============ */
.product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  transition: all .35s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px -20px rgba(44,24,16,.25);
}
.product-card .img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .6s ease;
}
.product-card:hover .img-wrap img { transform: scale(1.06); }
.product-card .img-wrap .badge-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-sale);
  color: #fff;
  font-size: .7rem;
  padding: .3rem .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.product-card .img-wrap .quick-add {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-primary);
  color: #fff;
  padding: .85rem;
  text-align: center;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  width: 100%;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.product-card:hover .quick-add { transform: translateY(0); }
.product-card .body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card h3 {
  font-size: 1.05rem;
  margin: 0 0 .5rem;
  line-height: 1.3;
}
.product-card h3 a { color: var(--color-primary); }
.product-card h3 a:hover { color: var(--color-secondary); }
.product-card .price {
  display: flex;
  gap: .6rem;
  align-items: baseline;
  margin-top: auto;
}
.product-card .price .sale {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-sale);
}
.product-card .price .orig {
  font-size: .95rem;
  color: var(--color-muted);
  text-decoration: line-through;
}
.product-card .price .single {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
}
.rating { color: #d4a13e; font-size: .85rem; }
.rating .count { color: var(--color-muted); margin-left: .25rem; }

/* ============ PRODUCT DETAIL ============ */
.product-gallery {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
}
.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: 600px;
  overflow-y: auto;
}
.gallery-thumbs .thumb {
  aspect-ratio: 1 / 1;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.gallery-thumbs .thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.gallery-thumbs .thumb.active { border-color: var(--color-primary); }
.gallery-main {
  aspect-ratio: 1 / 1;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.gallery-main img {
  width: 100%; height: 100%; object-fit: cover;
}
@media (max-width: 768px) {
  .product-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 90px;
  }
  .gallery-thumbs {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
  }
  .gallery-thumbs .thumb { width: 80px; flex-shrink: 0; }
}

.product-info h1 {
  font-size: 2rem;
  margin-bottom: .5rem;
}
.product-info .price-block {
  display: flex;
  gap: .75rem;
  align-items: baseline;
  margin: 1rem 0 1.5rem;
}
.product-info .price-block .sale {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-sale);
}
.product-info .price-block .orig {
  font-size: 1.15rem;
  color: var(--color-muted);
  text-decoration: line-through;
}
.product-info .price-block .savings {
  background: var(--color-sale);
  color: #fff;
  padding: .25rem .6rem;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.variant-group { margin-bottom: 1.5rem; }
.variant-group label {
  display: block;
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: .5rem;
  font-weight: 600;
}
.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.variant-options .opt {
  padding: .5rem 1.1rem;
  border: 1px solid var(--color-border);
  background: #fff;
  cursor: pointer;
  font-size: .85rem;
  transition: all .2s ease;
  user-select: none;
}
.variant-options .opt:hover { border-color: var(--color-primary); }
.variant-options .opt.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.qty-selector {
  display: inline-flex;
  border: 1px solid var(--color-border);
  background: #fff;
}
.qty-selector button {
  background: transparent;
  border: none;
  width: 40px;
  height: 44px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--color-primary);
}
.qty-selector button:hover { background: var(--color-bg-alt); }
.qty-selector input {
  border: none;
  width: 50px;
  text-align: center;
  height: 44px;
  font-weight: 600;
}
.qty-selector input:focus { outline: none; }

.product-meta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: .9rem;
  color: var(--color-muted);
}
.product-meta div { margin-bottom: .35rem; }
.product-meta strong { color: var(--color-primary); }

/* ============ CART PAGE ============ */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}
.cart-table th {
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 600;
}
.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  background: var(--color-bg-alt);
}
.cart-item-name {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: .15rem;
}
.cart-item-variant { font-size: .8rem; color: var(--color-muted); }
.cart-remove {
  background: none;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 1.1rem;
}
.cart-remove:hover { color: var(--color-sale); }

.cart-summary {
  background: var(--color-bg-alt);
  padding: 2rem;
  border: 1px solid var(--color-border);
}
.cart-summary h3 { margin-top: 0; margin-bottom: 1.25rem; }
.cart-summary .row-line {
  display: flex;
  justify-content: space-between;
  padding: .6rem 0;
  border-bottom: 1px dashed var(--color-border);
}
.cart-summary .total {
  font-size: 1.25rem;
  font-weight: 700;
  border-top: 2px solid var(--color-primary);
  border-bottom: none;
  margin-top: .5rem;
  padding-top: 1rem;
}

.empty-cart {
  text-align: center;
  padding: 4rem 1rem;
}
.empty-cart svg { color: var(--color-border); margin-bottom: 1.5rem; }

/* ============ PAGE BANNER ============ */
.page-banner {
  background: var(--color-bg-alt);
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.page-banner h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .5rem; }
.page-banner .breadcrumb {
  display: inline-flex;
  gap: .5rem;
  font-size: .85rem;
  color: var(--color-muted);
  background: transparent;
  padding: 0;
  margin: 0;
}
.page-banner .breadcrumb a { color: var(--color-muted); }
.page-banner .breadcrumb a:hover { color: var(--color-primary); }

/* ============ ABOUT / CONTACT ============ */
.about-img {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.about-img img { width: 100%; height: 100%; object-fit: cover; }

.contact-info-card {
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 2rem;
  height: 100%;
}
.contact-info-card .icon {
  width: 50px;
  height: 50px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-primary);
}
.contact-info-card h4 {
  font-size: 1.05rem;
  margin-bottom: .5rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.contact-info-card p { color: var(--color-muted); margin: 0; font-size: .95rem; }

.contact-form input,
.contact-form textarea {
  border-radius: 0;
  border: 1px solid var(--color-border);
  padding: .85rem 1rem;
  background: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: none;
}

/* ============ POLICY PAGES ============ */
.policy-content {
  max-width: 860px;
  margin: 0 auto;
  font-size: .98rem;
  color: var(--color-text);
}
.policy-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.policy-content h3 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: .75rem;
}
.policy-content p { margin-bottom: 1rem; line-height: 1.75; }
.policy-content ul { margin-bottom: 1rem; padding-left: 1.5rem; }
.policy-content li { margin-bottom: .35rem; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--color-primary);
  color: #d8c7b4;
  padding: 4rem 0 1.5rem;
  margin-top: 0;
}
.site-footer h5 {
  color: #fff;
  font-size: .95rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.site-footer .brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
}
.site-footer p, .site-footer li { color: #d8c7b4; font-size: .9rem; }
.site-footer a { color: #d8c7b4; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: .5rem; }
.site-footer .info-line {
  display: flex;
  gap: .65rem;
  margin-bottom: .65rem;
  font-size: .9rem;
}
.site-footer .info-line svg { flex-shrink: 0; margin-top: 3px; }
.site-footer .subscribe-form {
  display: flex;
  margin-top: .75rem;
}
.site-footer .subscribe-form input {
  flex: 1;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.05);
  color: #fff;
  padding: .65rem .9rem;
  font-size: .9rem;
}
.site-footer .subscribe-form input::placeholder { color: #a89784; }
.site-footer .subscribe-form button {
  background: var(--color-accent);
  border: none;
  color: #fff;
  padding: 0 1.25rem;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s ease;
}
.site-footer .subscribe-form button:hover { background: #fff; color: var(--color-primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: .85rem;
  color: #a89784;
  text-align: center;
}

/* ============ TOAST ============ */
.toast-container-custom {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.toast-custom {
  background: var(--color-primary);
  color: #fff;
  padding: 1rem 1.25rem;
  font-size: .9rem;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: .6rem;
  animation: slideIn .3s ease;
  border-left: 4px solid var(--color-accent);
}
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============ HELPERS ============ */
.text-muted-c { color: var(--color-muted) !important; }
.bg-cream { background: var(--color-bg-alt); }
.divider {
  width: 60px;
  height: 2px;
  background: var(--color-accent);
  margin: 1rem auto;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .section { padding: 3rem 0; }
  .hero { min-height: 460px; }
  .hero-content { padding: 3rem 0; }
  .navbar-brand { font-size: 1.3rem; }
  .top-bar { font-size: .75rem; }
}
