/* ODŌ — Black & White theme */

:root {
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-400: #a3a3a3;
  --black: #0a0a0a;
  --font: 'DM Sans', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--black);
  background: var(--white);
  min-height: 100vh;
}

.screen {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  flex-shrink: 0;
}

.logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.filters {
  display: flex;
  gap: 0.5rem;
}

.filter {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  color: var(--black);
  background: var(--gray-100);
  border: none;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.filter:hover {
  background: var(--gray-200);
}

.filter.active {
  color: var(--white);
  background: var(--black);
}

.cart-btn {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  background: var(--gray-100);
  border: none;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.cart-btn:hover {
  background: var(--gray-200);
}

.cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--white);
  background: var(--black);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.cart-count.has-items {
  opacity: 1;
}

/* Products */
.products {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.product-card {
  border: 1px solid var(--gray-200);
  border-radius: 32px;
  overflow: hidden;
  background: var(--white);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
  transform: scale(1.02);
  border-color: var(--gray-400);
}

.product-image {
  aspect-ratio: 3/4;
  background: var(--gray-100);
  overflow: hidden;
  border-radius: 24px;
  margin: 8px;
  margin-bottom: 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gray-400);
}

.product-info {
  padding: 1.25rem 1.5rem;
}

.product-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 0.35rem;
}

.product-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 1rem;
}

.add-to-cart {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  background: var(--black);
  border: none;
  border-radius: 999px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.add-to-cart:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 1rem;
  right: 1rem;
  bottom: 1rem;
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(calc(100% + 2rem));
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.cart-header h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--black);
}

.cart-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--black);
  background: var(--gray-100);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.cart-close:hover {
  background: var(--gray-200);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.5rem;
}

.cart-empty {
  color: var(--gray-400);
  font-size: 0.95rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 72px;
  height: 90px;
  background: var(--gray-100);
  border-radius: 20px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--gray-400);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

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

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.5rem;
}

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

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.cart-item-qty button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: 999px;
  font-size: 1rem;
  color: var(--black);
  transition: all 0.2s ease;
}

.cart-item-qty button:hover {
  border-color: var(--black);
  background: var(--gray-100);
}

.cart-item-remove {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-left: auto;
}

.cart-item-remove:hover {
  color: var(--black);
  text-decoration: underline;
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--black);
}

.cart-total span:last-child {
  font-weight: 600;
}

.checkout-btn {
  width: 100%;
  padding: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
  background: var(--black);
  border: none;
  border-radius: 999px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.checkout-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Checkout Modal */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.checkout-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.checkout-content {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.checkout-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--black);
}

.checkout-modal-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--black);
  background: var(--gray-100);
  border-radius: 999px;
}

.checkout-modal-close:hover {
  background: var(--gray-200);
}

.checkout-form {
  padding: 1.5rem;
}

.checkout-order-summary {
  font-size: 0.9rem;
  color: var(--gray-400);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.checkout-order-summary div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.checkout-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.checkout-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--black);
}

.checkout-fields input,
.checkout-fields textarea {
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
}

.checkout-fields input:focus,
.checkout-fields textarea:focus {
  outline: none;
  border-color: var(--black);
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.checkout-submit {
  width: 100%;
  padding: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  background: var(--black);
  border: none;
  border-radius: 999px;
  transition: opacity 0.2s ease;
}

.checkout-submit:hover:not(:disabled) {
  opacity: 0.9;
}

.checkout-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.checkout-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.4em;
}

.checkout-message.success {
  color: #16a34a;
}

.checkout-message.error {
  color: #dc2626;
}

.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 109;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.checkout-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .header {
    padding: 0.9rem 1rem;
  }

  .logo {
    height: 30px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .product-card {
    border-radius: 16px;
  }

  .product-image {
    border-radius: 12px;
    margin: 5px;
  }

  .product-info {
    padding: 0.85rem 1rem 1rem;
  }

  .product-name,
  .product-price {
    font-size: 0.95rem;
  }

  .add-to-cart {
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
  }

  .cart-sidebar {
    top: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    border-radius: 0;
    border-left: none;
  }

  .cart-header,
  .cart-footer {
    padding: 1rem;
  }

  .cart-items {
    padding: 0 1rem;
  }

  .checkout-modal {
    padding: 0;
    align-items: flex-end;
  }

  .checkout-content {
    max-width: 100%;
    max-height: 100dvh;
    border-radius: 18px 18px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .checkout-header,
  .checkout-form {
    padding: 1rem;
  }
}

@media (max-width: 380px) {
  .products {
    padding: 1rem 0.75rem 1.25rem;
  }

  .cart-btn {
    width: 42px;
    height: 42px;
  }
}


