@charset "UTF-8";

/* Shared mobile layout refinements for The Cake Couture */

/* Base spacing + typography tuning */
@media (max-width: 640px) {
  body {
    padding-top: 4.25rem;
  }

  h1 {
    font-size: 1.7rem;
    line-height: 1.25;
  }

  h2 {
    font-size: 1.25rem;
  }

  .container,
  .page-wrapper,
  .shop-container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* SHOP: product grid as spacious 2-up cards (BakeryBits-style) */
@media (max-width: 640px) {
  body #productGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.9rem !important;
  }

  body #productGrid .product-card {
    border-radius: 0.95rem !important;
    overflow: hidden;
    background: #ffffff !important;
    border: 1px solid rgba(251, 207, 232, 0.9) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05) !important;
  }

  /* Remove layered gradients and glass shine inside cards on mobile */
  body #productGrid .product-card::before,
  body #productGrid .product-card::after {
    content: none !important;
    display: none !important;
  }

  body #productGrid .product-image-wrapper {
    height: auto !important;
    padding-top: 0 !important;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-bottom: none !important;
    background: #ffffff !important;
  }

  /* Remove inner glass frame overlay from the image on mobile */
  body #productGrid .product-image-wrapper::after {
    content: none !important;
    display: none !important;
  }

  body #productGrid .product-image-wrapper .product-image,
  body #productGrid .product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
  }

  body #productGrid .product-info {
    padding: 0.55rem 0.6rem 0.65rem !important;
    gap: 0.35rem !important;
  }

  body #productGrid .product-category {
    font-size: 0.68rem !important;
    margin-bottom: 0.15rem !important;
  }

  body #productGrid .product-title {
    font-size: 0.82rem !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  body #productGrid .product-price-section {
    padding-top: 0.3rem !important;
    margin-top: 0.15rem !important;
    border-top: none !important;
  }

  body #productGrid .price-current {
    font-size: 0.9rem !important;
  }

  body #productGrid .add-to-cart-btn {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    padding: 0.55rem 0.75rem !important;
    margin-top: 0.45rem !important;
    font-size: 0.85rem !important;
    border-radius: 999px !important;
  }

  body #productGrid .product-stock-info {
    display: none !important;
  }

  /* Extra safety: hide verbose size chips if any slip through */
  body #productGrid .product-sizes {
    display: none !important;
  }
}

/* SHOP: product modal – smaller and scrollable on mobile */
@media (max-width: 640px) {
  #productModal > .relative.z-10.flex.items-center {
    align-items: flex-start;
    padding-top: 4.25rem;
    padding-bottom: 1.5rem;
  }

  #productModal .product-modal-panel {
    max-height: calc(100vh - 6rem);
    width: 92%;
    margin-left: auto;
    margin-right: auto;
    overflow-y: auto;
  }

  #productModal #productModalTitle {
    font-size: 1.2rem;
  }

  #productModal #productModalDescription {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  #productModal #productModalImage {
    max-height: 170px;
  }
}

/* CART: tighten cards and summary on phones */
@media (max-width: 640px) {
  .cart-item {
    padding: 0.75rem 0.6rem !important;
    border-radius: 1rem !important;
  }

  .cart-item-title {
    font-size: 0.82rem !important;
  }

  .cart-item-price {
    font-size: 0.75rem !important;
  }

  .cart-item-quantity {
    gap: 0.35rem !important;
    padding: 0.2rem 0.3rem !important;
  }

  .quantity-display {
    font-size: 0.8rem !important;
  }

  .checkout-btn {
    font-size: 0.95rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
}

/* CHECKOUT: compact cards and layout */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 1.5rem 1rem 3rem !important;
  }

  .hero-header {
    margin-bottom: 1.5rem !important;
  }

  .hero-title {
    font-size: 1.9rem !important;
  }

  .layout-grid {
    padding: 0.8rem 0.9rem !important;
    gap: 1.25rem !important;
  }

  .checkout-card {
    padding: 1.3rem !important;
  }

  .payment-method-container {
    gap: 0.75rem !important;
  }

  .payment-method {
    padding: 0.85rem !important;
  }

  .btn {
    padding-top: 0.7rem !important;
    padding-bottom: 0.7rem !important;
    font-size: 0.95rem !important;
  }

  #checkoutCartItems {
    max-height: 11rem !important;
  }
}
