/*
Theme Name: Xyra Lite
Author: Xyra
Version: 1.0
Description: Minimal luxury WooCommerce theme
*/

/* =========================
VARIABLES
========================= */
:root {
  --accent: #9e025e;
  --text: #111;
  --muted: #666;
  --border: #eee;
  --bg: #fff;
  --success: #4caf50;
}

/* =========================
RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* =========================
LAYOUT
========================= */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* =========================
HEADER LAYOUT
========================= */
.xyra-header { position: sticky; top: 0; background: #fff; z-index: 999; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 15px; flex-wrap: wrap; }
.logo img { height: 40px; width: auto; }

.header-search { flex: 1; max-width: 400px; position: relative; }
.header-search input { width: 100%; padding: 10px 40px 10px 15px; border: 1px solid var(--border); border-radius: 8px; outline: none; font-size: 14px; }
.header-search button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; }

.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 180px; }
.social-icons { display: flex; gap: 12px; font-size: 15px; color: var(--muted); }
.social-icons a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.account-link { font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none; }
.account-link:hover { color: var(--accent); }

/* ✅ CART BUTTON */
.cart-btn {
  display: flex; align-items: center; gap: 8px;
  background: #9e025e; color: #fff;
  padding: 8px 14px; border: none; border-radius: 8px;
  cursor: pointer; font-size: 14px; font-weight: 500;
  transition: 0.2s; position: relative;
}
.cart-btn:hover { opacity: 0.9; }
.cart-icon { font-size: 16px; }
.cart-badge {
  background: #fff; color: #9e025e;
  font-size: 11px; font-weight: bold;
  padding: 2px 6px; border-radius: 10px;
  min-width: 18px; text-align: center;
}
.cart-amount { font-weight: 600; }

.nav-strip {
  background: var(--accent);
}

.nav-menu {
  display: flex;
  justify-content: center;
  gap: 40px;
  list-style: none;
  padding: 12px 0;
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-menu a:hover {
  opacity: 0.8;
}

/* =========================
HERO
========================= */
.xyra-hero {
  height: 85vh;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  color: #fff;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-inner h1 {
  font-size: 48px;
  font-weight: 600;
}

.hero-inner p {
  margin: 15px 0 25px;
  font-size: 16px;
}

/* =========================
BUTTONS & LINKS
========================= */
.button,
a.button,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.button:hover,
a.button:hover,
button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

/* =========================
SECTIONS & HEADINGS
========================= */
section {
  padding: 80px 0;
}

h2 {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 8px auto 0;
}

/* =========================
GRIDS
========================= */
.xyra-grid, .cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  font-size: 14px;
}

/* =========================
PRODUCT CARD
========================= */
.xyra-product {
  border: 1px solid var(--border);
  padding: 20px;
  background: #fff;
  text-align: center;
  transition: all 0.3s ease;
}

.xyra-product:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.xyra-product img {
  width: 100%;
  height: 200px;
  object-fit: contain;
}

.product-title {
  font-size: 14px;
  margin: 10px 0;
  min-height: 40px;
}

.product-price {
  margin: 10px 0;
  font-weight: 500;
}

.xyra-cart-control {
  margin-top: 10px;
  text-align: center;
}

.qty-box {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.qty-box button {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.qty {
  min-width: 20px;
  text-align: center;
  font-weight: 500;
}

/* =========================
CATEGORIES
========================= */
.cat-card {
  text-decoration: none;
  color: #000;
  text-align: center;
}

.cat-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
}

/* =========================
TRUST & CTA
========================= */
.xyra-trust {
  background: #fafafa;
}

.xyra-cta {
  background: #000;
  color: #fff;
  text-align: center;
}

.xyra-cta .button {
  background: #fff;
  color: #000 !important;
}

/* =========================
BLOG
========================= */
.xyra-blog-page {
  padding: 60px 0;
}

.blog-heading {
  text-align: center;
  margin-bottom: 40px;
}

.blog-card {
  background: #fff;
  border: 1px solid #eee;
  transition: 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.blog-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.blog-content {
  padding: 15px;
}

.blog-title {
  font-size: 16px;
  margin-bottom: 10px;
}

.blog-excerpt {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.read-more {
  font-size: 13px;
  color: var(--accent);
}

/* =========================
CART DRAWER & OVERLAY
========================= */
.xyra-cart-drawer {
  position: fixed; top: 0; right: 0;
  width: 360px; max-width: 85vw; height: 100vh;
  background: #fff; z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px; box-shadow: -4px 0 15px rgba(0,0,0,0.1);
  display: flex; flex-direction: column; overflow-y: auto;
}
.xyra-cart-drawer.open { transform: translateX(0); }

.cart-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4);
  z-index: 9998; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.cart-header h3 { font-size: 18px; font-weight: 600; }

.close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  padding: 5px;
}

.cart-progress { padding: 15px 0; border-bottom: 1px solid #eee; }

.progress-bar {
  height: 8px; background: #eee; border-radius: 4px;
  overflow: hidden; margin: 8px 0;
}

.progress-fill {
  height: 100%; background: var(--accent); width: 0%;
  transition: width 0.4s ease;
}

.progress-text { font-size: 13px; color: var(--muted); margin: 0; }

.cart-items {
  flex: 1; overflow-y: auto; margin: 15px 0; min-height: 150px;
}

.cart-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid #f3f3f3;
}

.cart-item-title { font-size: 14px; flex: 1; padding-right: 10px; }

.cart-controls { display: flex; align-items: center; gap: 8px; }
.cart-controls button {
  width: 26px; height: 26px; border: none; background: var(--accent);
  color: #fff; border-radius: 50%; cursor: pointer; font-size: 14px;
}

.remove-item {
  margin-left: 8px; cursor: pointer; font-size: 14px; color: #999;
  background: transparent; border: none;
}

.cart-footer {
  border-top: 1px solid #eee; padding-top: 15px; margin-top: auto;
}

.cart-total-row {
  display: flex; justify-content: space-between; font-weight: bold;
  font-size: 1.2rem; margin-bottom: 15px;
}

.checkout-btn {
  display: block; background: #2d2d2d; color: #fff !important;
  text-align: center; padding: 14px; border-radius: 6px;
  text-decoration: none !important; font-weight: 500; transition: background 0.2s;
}

.checkout-btn:hover { background: #444; }

.upsell-products {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #eee;
}

.upsell-item { text-align: center; }
.upsell-item img {
  width: 100%; height: 60px; object-fit: cover; border-radius: 4px;
}
.upsell-item p {
  font-size: 12px; margin: 5px 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.upsell-add {
  background: #f0f0f0; border: none; padding: 6px 10px; cursor: pointer;
  border-radius: 4px; font-size: 11px; transition: 0.2s;
}
.upsell-add:hover { background: var(--accent); color: #fff; }

.xyra-trust-footer {
  display: flex; justify-content: center; gap: 20px; font-size: 12px;
  color: var(--muted); padding: 20px 0; text-align: center;
}
/* =========================
MOBILE RESPONSIVE
========================= */
@media (max-width: 900px) {
  .header-inner { flex-direction: column; align-items: stretch; gap: 12px; padding: 10px 0; }
  .header-search { max-width: 100%; order: 2; }
  .header-right { flex-direction: row; justify-content: space-between; align-items: center; order: 3; min-width: auto; }
  .social-icons { order: 1; }
  .header-actions { order: 2; }
  .nav-menu { gap: 15px; flex-wrap: wrap; justify-content: center; }
  
  /* Drawer stays narrow on mobile as requested */
  .xyra-cart-drawer { width: 85vw; max-width: 400px; }
}