/* ── KOZYA SHOP STYLES ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --deep-green: #3D4F3D;
  --sage: #8B9E8B;
  --sage-light: #A8B8A8;
  --sage-dark: #6B7E6B;
  --beige: #E8DDD3;
  --beige-light: #F0E6DC;
  --warm-white: #FAF8F5;
  --off-white: #F5F2EE;
  --stone: #B8B4AE;
  --stone-light: #D4D0CB;
  --charcoal: #2D2D2D;
  --charcoal-light: #4A4A4A;
  --soft-black: #1A1A1A;
  --success: #4A7C59;
  --warning: #C4913C;
  --error: #B84C4C;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--warm-white);
  color: var(--charcoal);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

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

main { flex: 1; }

/* ── NAV ── */
nav {
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.85rem;
  color: var(--charcoal-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--deep-green); }

.nav-cta {
  font-size: 0.8rem;
  background: var(--deep-green);
  color: var(--warm-white);
  padding: 0.55rem 1.25rem;
  border-radius: 100px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--sage-dark);
  transform: translateY(-1px);
}

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--charcoal);
  transition: color 0.2s;
}

.nav-cart:hover { color: var(--deep-green); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--deep-green);
  color: white;
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.cart-badge:empty { display: none; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--deep-green);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--sage-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61,79,61,0.2);
}

.btn-primary:disabled {
  background: var(--stone-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--charcoal);
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--stone-light);
  transition: border-color 0.2s, background 0.2s;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--sage);
  background: rgba(139,158,139,0.05);
}

.btn-small {
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
}

.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
}

.btn-danger:hover {
  background: rgba(184,76,76,0.05);
  border-color: var(--error);
}

/* ── FORMS ── */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--stone-light);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder { color: var(--stone); }

.form-input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(139,158,139,0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── CONTAINER ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 3rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--charcoal);
  letter-spacing: -1px;
  font-weight: 700;
}

.page-header p {
  font-size: 1rem;
  color: var(--charcoal-light);
  margin-top: 0.5rem;
  line-height: 1.6;
}

.breadcrumb {
  font-size: 0.78rem;
  color: var(--stone);
  margin-bottom: 0.75rem;
}

.breadcrumb a {
  color: var(--sage-dark);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

/* ── PRODUCT GRID ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 0 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.product-image {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image svg {
  opacity: 0.7;
}

.product-category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.9);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--charcoal-light);
  backdrop-filter: blur(4px);
}

.product-info {
  padding: 1.25rem;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.3rem;
  letter-spacing: -0.2px;
}

.product-desc {
  font-size: 0.78rem;
  color: var(--stone);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--deep-green);
}

.product-price .currency {
  font-size: 0.85rem;
  font-weight: 500;
}

.add-to-cart-btn {
  background: var(--deep-green);
  color: white;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.add-to-cart-btn:hover {
  background: var(--sage-dark);
  transform: scale(1.1);
}

.add-to-cart-btn.added {
  background: var(--success);
}

/* ── CATEGORY FILTER ── */
.category-filter {
  display: flex;
  gap: 0.5rem;
  padding: 0 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  border: 1px solid var(--stone-light);
  background: transparent;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  color: var(--charcoal-light);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.filter-btn:hover {
  border-color: var(--sage);
  color: var(--deep-green);
}

.filter-btn.active {
  background: var(--deep-green);
  color: white;
  border-color: var(--deep-green);
}

/* ── CART ── */
.cart-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.cart-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.cart-empty h2 {
  font-size: 1.5rem;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.cart-empty p {
  color: var(--stone);
  margin-bottom: 2rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  padding: 1.25rem;
  transition: box-shadow 0.2s;
}

.cart-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 0.25rem;
}

.cart-item-price {
  font-size: 0.85rem;
  color: var(--sage-dark);
  font-weight: 500;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--stone-light);
  border-radius: 10px;
  overflow: hidden;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
  transition: background 0.15s;
}

.qty-btn:hover { background: var(--off-white); }

.qty-value {
  width: 36px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--charcoal);
  border-left: 1px solid var(--stone-light);
  border-right: 1px solid var(--stone-light);
  padding: 0.35rem 0;
}

.cart-item-total {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--deep-green);
  min-width: 70px;
  text-align: right;
}

.cart-remove {
  background: none;
  border: none;
  color: var(--stone);
  cursor: pointer;
  padding: 0.35rem;
  transition: color 0.2s;
  display: flex;
}

.cart-remove:hover { color: var(--error); }

/* ── CART SUMMARY ── */
.cart-summary {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--charcoal-light);
}

.summary-row.total {
  border-top: 2px solid var(--beige);
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
}

.summary-row.total .amount {
  color: var(--deep-green);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.3rem;
}

.free-shipping {
  color: var(--success);
  font-weight: 500;
}

.cart-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── CHECKOUT ── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
}

.checkout-form-section {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  padding: 2rem;
}

.checkout-form-section h2 {
  font-size: 1.15rem;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.checkout-summary {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  padding: 2rem;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.checkout-summary h2 {
  font-size: 1.15rem;
  color: var(--charcoal);
  margin-bottom: 1rem;
  font-weight: 600;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--off-white);
  font-size: 0.85rem;
}

.checkout-item-name {
  color: var(--charcoal);
  flex: 1;
}

.checkout-item-qty {
  color: var(--stone);
  margin: 0 0.75rem;
  font-size: 0.78rem;
}

.checkout-item-price {
  font-weight: 600;
  color: var(--charcoal);
  white-space: nowrap;
}

/* ── CONFIRMATION ── */
.confirmation-page {
  max-width: 650px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  text-align: center;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(74,124,89,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.confirmation-page h1 {
  font-size: 1.8rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.confirmation-page > p {
  color: var(--charcoal-light);
  margin-bottom: 2rem;
}

.confirmation-details {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
  margin-bottom: 2rem;
}

.confirmation-details h3 {
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 1rem;
  font-weight: 600;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.88rem;
  color: var(--charcoal-light);
  border-bottom: 1px solid var(--off-white);
}

.detail-row:last-child { border-bottom: none; }

.detail-label { color: var(--stone); }
.detail-value { font-weight: 500; color: var(--charcoal); }

/* ── TOAST NOTIFICATION ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--deep-green);
  color: white;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── ADMIN ── */
.admin-login {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem;
  text-align: center;
}

.admin-login h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 12px;
  padding: 1.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-top: 0.25rem;
}

.orders-table {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  overflow: hidden;
  border-collapse: collapse;
}

.orders-table th {
  background: var(--off-white);
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--stone);
  font-weight: 600;
}

.orders-table td {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  border-top: 1px solid var(--off-white);
  color: var(--charcoal);
}

.orders-table tr:hover td {
  background: rgba(139,158,139,0.03);
}

.status-badge {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending { background: rgba(196,145,60,0.1); color: var(--warning); }
.status-paid { background: rgba(74,124,89,0.1); color: var(--success); }
.status-processing { background: rgba(59,130,246,0.1); color: #3B82F6; }
.status-shipped { background: rgba(139,158,139,0.15); color: var(--sage-dark); }
.status-delivered { background: rgba(61,79,61,0.1); color: var(--deep-green); }
.status-cancelled { background: rgba(184,76,76,0.1); color: var(--error); }

.order-detail-row {
  display: none;
}

.order-detail-row.open {
  display: table-row;
}

.order-detail-content {
  padding: 1.25rem;
  background: var(--warm-white);
}

.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.order-detail-section h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sage-dark);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.order-detail-section p {
  font-size: 0.85rem;
  color: var(--charcoal-light);
  margin: 0.25rem 0;
}

.status-select {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--stone-light);
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  color: var(--charcoal);
  background: white;
  cursor: pointer;
}

/* ── FOOTER ── */
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--stone);
  width: 100%;
}

footer a {
  color: var(--sage-dark);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

.footer-links {
  display: flex;
  gap: 1.5rem;
}

/* ── LOADING ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--stone);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--stone-light);
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 0.75rem;
}

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

/* ── RESPONSIVE ── */
@media (max-width: 968px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .checkout-layout { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .order-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  nav { padding: 1rem 1.5rem; }
  .nav-link { display: none; }
  .page-header { padding: 2rem 1.5rem 1.5rem; }
  .product-grid { padding: 0 1.5rem 3rem; }
  .category-filter { padding: 0 1.5rem 1rem; }
  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem;
  }
  .cart-item { flex-wrap: wrap; }
  .cart-item-total { min-width: auto; }
  .admin-stats { grid-template-columns: 1fr; }
  .orders-table { font-size: 0.8rem; }
  .orders-table th, .orders-table td { padding: 0.6rem 0.5rem; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cart-actions { flex-direction: column; }
  .cart-actions .btn-primary, .cart-actions .btn-secondary { width: 100%; justify-content: center; }
}


/* ── PRODUCT DETAIL PAGE ── */
.product-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 2rem;
    align-items: start;
}

.product-detail-image {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1;
    min-height: 400px;
}

.product-detail-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-skeleton {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--off-white) 25%, var(--beige-light) 50%, var(--off-white) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.product-detail-info {
    display: flex;
    flex-direction: column;
}

#product-name-heading {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.product-detail-price {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.category-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(139, 158, 139, 0.12);
    color: var(--sage-dark);
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.78rem;
}

.product-detail-desc {
    color: var(--charcoal-light);
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.product-meta-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--charcoal-light);
}

.product-delivery-note {
    text-align: center;
    color: var(--success);
    font-weight: 500;
}

.product-card {
    color: inherit;
    text-decoration: none;
    display: block;
}

.product-card:hover .product-name {
    color: var(--deep-green);
}

@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .product-detail-image {
        min-height: 280px;
    }
}

@media (max-width: 600px) {
    .product-detail {
        padding: 1rem;
    }
    .product-meta-row {
        flex-direction: column;
        gap: 0.75rem;
    }
}
