/* ============================================
   WEBSHOP STYLES - JC Design & Print
   ============================================ */

/* ---- Shop Hero ---- */
.shop-hero {
  padding: 10rem 0 3rem;
  background: var(--dark);
  text-align: center;
  position: relative;
}
.shop-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}
.shop-hero h1 {
  font-family: 'Cardo', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  margin-bottom: 0.5rem;
}
.shop-hero p {
  color: var(--gray-light);
  font-size: 1.1rem;
}

/* ---- Filters ---- */
.shop-filters {
  background: var(--dark);
  padding: 1.5rem 0;
  position: sticky;
  top: 70px;
  z-index: 30;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: var(--gray-light);
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.filter-btn.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* ---- Products Grid ---- */
.shop-products {
  background: var(--dark);
  padding: 3rem 0 5rem;
  min-height: 50vh;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ---- Product Card ---- */
.product-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
}
.product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.product-card:hover .product-image img {
  transform: scale(1.05);
}
.product-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255,255,255,0.15);
}
.product-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-badge.sale {
  background: #ef4444;
  color: #fff;
}
.product-badge.featured {
  background: var(--orange);
  color: #fff;
  right: auto;
  left: 0.75rem;
}
.product-badge.soldout {
  background: rgba(0,0,0,0.7);
  color: var(--gray-light);
}
.product-info {
  padding: 1.25rem;
}
.product-category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.product-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.price-current {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}
.price-old {
  font-size: 0.9rem;
  color: var(--gray-light);
  text-decoration: line-through;
}

/* ---- Size & Color selectors ---- */
.product-sizes, .product-colors {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.size-btn {
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: var(--gray-light);
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.size-btn:hover, .size-btn.selected {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(239, 124, 0, 0.08);
}
.color-btn {
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: var(--gray-light);
  border-radius: 4px;
  font-size: 0.68rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.color-btn:hover, .color-btn.selected {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(239, 124, 0, 0.08);
}

/* ---- Add to cart button ---- */
.add-to-cart-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.add-to-cart-btn:hover { opacity: 0.9; }
.add-to-cart-btn:active { transform: scale(0.98); }
.add-to-cart-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Cart Toggle ---- */
.shop-cart-toggle {
  position: relative;
  cursor: pointer;
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 0.5rem;
  transition: color 0.2s;
  margin-left: 0.5rem;
}
.shop-cart-toggle:hover { color: var(--orange); }
.cart-count {
  position: absolute;
  top: -2px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-count[data-count="0"] { display: none; }

/* ---- Cart Sidebar ---- */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 998;
}
.cart-overlay.open { display: block; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: #111;
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  border-left: 1px solid rgba(255,255,255,0.08);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cart-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}
.cart-close {
  background: none;
  border: none;
  color: var(--gray-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}
.cart-close:hover { color: var(--white); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255,255,255,0.25);
  gap: 0.75rem;
}
.cart-empty p { font-size: 0.9rem; }

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cart-item-image {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
}
.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-details { flex: 1; }
.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--white);
  margin-bottom: 0.2rem;
}
.cart-item-meta {
  font-size: 0.75rem;
  color: var(--gray-light);
  margin-bottom: 0.5rem;
}
.cart-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-item-price {
  font-weight: 600;
  color: var(--orange);
  font-size: 0.9rem;
}
.cart-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cart-qty button {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: var(--white);
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}
.cart-qty button:hover { border-color: var(--orange); }
.cart-qty span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  min-width: 20px;
  text-align: center;
}

.cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.cart-subtotal, .cart-shipping, .cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-light);
}
.cart-shipping-hint {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.75rem;
}
.cart-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.checkout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.checkout-btn:hover { opacity: 0.9; }
.checkout-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Checkout Modal ---- */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.checkout-modal {
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}
.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.checkout-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}
.checkout-body {
  padding: 1.5rem;
}
.checkout-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 0.75rem;
  margin-top: 1rem;
}
.checkout-section-title:first-child { margin-top: 0; }

.checkout-body .form-group {
  margin-bottom: 1rem;
}
.checkout-body .form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-light);
  margin-bottom: 0.35rem;
}
.checkout-body .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.checkout-body input,
.checkout-body textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 0.65rem 0.875rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.checkout-body input:focus,
.checkout-body textarea:focus {
  border-color: var(--orange);
}
.checkout-body input::placeholder,
.checkout-body textarea::placeholder {
  color: rgba(255,255,255,0.25);
}

.checkout-summary {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 1rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}
.checkout-summary .summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  color: var(--gray-light);
}
.checkout-summary .summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---- Order Success ---- */
.order-success {
  text-align: center;
  padding: 2rem 0;
}
.order-success svg { margin-bottom: 1rem; }
.order-success h3 {
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.order-success p {
  color: var(--gray-light);
  margin-bottom: 0.35rem;
}

/* ---- Empty state ---- */
.shop-empty {
  text-align: center;
  padding: 4rem 0;
  color: rgba(255,255,255,0.25);
}
.shop-empty h3 {
  font-size: 1.25rem;
  color: var(--white);
  margin: 1rem 0 0.5rem;
}
.shop-empty p { color: var(--gray-light); }

/* ---- Toast ---- */
.shop-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 1100;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  max-width: 300px;
}
.shop-toast.show {
  transform: translateY(0);
  opacity: 1;
}
.shop-toast.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .shop-hero { padding: 8rem 0 2rem; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
  .checkout-body .form-row { grid-template-columns: 1fr; }
  .shop-filters { top: 60px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .product-info { padding: 0.75rem; }
  .product-name { font-size: 0.85rem; }
  .price-current { font-size: 0.95rem; }
  .cart-sidebar { width: 100%; max-width: 100%; }
}
