/* ZARA-INSPIRED SHOP CSS */

:root {
  --zara-black: #111111;
  --zara-white: #ffffff;
  --zara-gray: #777777;
  --zara-light-gray: #cccccc;
  --zara-border: #e8e8e8;
}

.shop-page {
  background: var(--zara-white);
  color: var(--zara-black);
  font-family: 'Inter', system-ui, sans-serif;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 20px;
}

/* Promo bar */
.shop-promo-bar {
  width: 100%;
  background: var(--zara-black);
  padding: 8px 0;
  text-align: center;
}

.shop-promo-bar a {
  color: var(--zara-white);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
}

/* Header */
.shop-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  background: var(--zara-white);
  border-bottom: 1px solid var(--zara-border);
}

.shop-top-links,
.shop-header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.shop-top-link,
.shop-auth-link {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--zara-black);
}

.shop-top-link:hover,
.shop-auth-link:hover {
  color: var(--zara-black);
}

.shop-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 30px;
}

.shop-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: none;
}


/* Cart button */
.nav-cart-btn {
  border: 1px solid var(--zara-black);
  background: transparent;
  color: var(--zara-black);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.nav-cart-btn svg {
  width: 18px;
  height: 18px;
}

#cartCount {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 700;
  color: var(--zara-white);
  background: var(--zara-black);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Main nav section */
.shop-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--zara-border);
}

.shop-main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  align-items: center;
}

.shop-main-nav a {
  color: var(--zara-black);
  text-decoration: none;
  white-space: nowrap;
}

.shop-main-nav a:hover {
  color: var(--zara-black);
  font-weight: 700;
}

.shop-search-wrap {
  flex: 0 0 auto;
}

.shop-search {
  display: flex;
  align-items: center;
  position: relative;
  width: 240px;
  background: var(--zara-white);
  border-radius: 50px;
  padding: 10px 16px;
  border: 1px solid var(--zara-light-gray);
}

.shop-search::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23777' stroke-width='2'/%3E%3Cpath d='M16 16l5 5' stroke='%23777' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.shop-search input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 0 8px 24px;
  font-size: 12px;
  color: var(--zara-black);
  outline: none;
}

.shop-search input::placeholder {
  color: var(--zara-gray);
}

/* Category header */
.shop-category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 32px 0 16px;
  border-bottom: 1px solid var(--zara-border);
  margin-bottom: 24px;
}

.shop-title {
  font-family: 'Bodoni Moda', serif;
  font-size: 3.2rem;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--zara-black);
  margin: 0;
}

.shop-count {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--zara-gray);
}

/* Product grid - 3 per row */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--zara-white);
  border: 1px solid var(--zara-border);
  position: relative;
  cursor: pointer;
  width: 100%;
}

.product-image-wrap {
  width: 100%;
  height: 420px;
  background: var(--zara-white);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  display: block;
}

.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--zara-white);
  background: rgba(255, 255, 255, 0.85);
  color: var(--zara-black);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wishlist-btn.selected {
  background: var(--zara-black);
  color: var(--zara-white);
}

.product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-meta {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--zara-gray);
}

.product-name {
  font-family: 'Bodoni Moda', serif;
  font-size: 16px;
  line-height: 1.2;
  color: var(--zara-black);
}

.product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--zara-black);
}

/* Quick add section - overlay on image */
.quick-add {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--zara-white);
  border-top: 1px solid var(--zara-border);
  padding: 14px 16px;
  flex-direction: column;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.product-card:hover .quick-add {
  display: flex;
  transform: translateY(0);
}

.product-card.is-open .quick-add,
.product-card.is-open:hover .quick-add {
  display: flex;
  transform: translateY(0);
}

.quick-add-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--zara-gray);
  text-align: center;
}

.size-options {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.size-btn {
  border: 1px solid var(--zara-light-gray);
  background: var(--zara-white);
  color: var(--zara-black);
  padding: 8px 12px;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
  min-width: 40px;
}

.size-btn:hover,
.size-btn.selected {
  border-color: var(--zara-black);
  background: var(--zara-black);
  color: var(--zara-white);
}

.add-btn {
  background: var(--zara-black);
  color: var(--zara-white);
  border: none;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Cart sidebar - Zara-style side cart */
.cart-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.cart-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  background: var(--zara-white);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

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

.cart-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--zara-border);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

.cart-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--zara-black);
}

.cart-items {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
  padding: 40px 20px;
  color: var(--zara-gray);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.8;
}

.cart-empty::before {
  content: "YOUR BASKET IS EMPTY";
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  margin-bottom: 8px;
  color: var(--zara-black);
}

.cart-empty::after {
  content: "The items you add will be shown here";
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

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

.cart-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--zara-border);
}

.cart-item-img {
  width: 60px;
  height: 80px;
  object-fit: cover;
  background: var(--zara-white);
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--zara-black);
  margin: 0;
}

.cart-item-meta {
  font-size: 11px;
  color: var(--zara-gray);
  margin: 0;
}

.cart-item-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--zara-black);
  margin: 0;
}

.cart-item-remove {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--zara-gray);
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--zara-border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cart-total-label {
  color: var(--zara-black);
}

.cart-total-amount {
  font-weight: 700;
  color: var(--zara-black);
}

.cart-checkout {
  display: block;
  text-align: center;
  background: var(--zara-black);
  color: var(--zara-white);
  padding: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

/* Size modal */
.size-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.size-modal.open {
  opacity: 1;
  visibility: visible;
}

.size-modal-content {
  background: var(--zara-white);
  display: flex;
  max-width: 500px;
  width: 100%;
}

.size-modal-image img {
  width: 200px;
  height: 260px;
  object-fit: cover;
}

.size-modal-info {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.size-modal-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.size-options-modal {
  display: flex;
  gap: 8px;
}

.size-confirm {
  background: var(--zara-black);
  color: var(--zara-white);
  border: none;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: auto;
}

.size-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-card {
    min-height: 480px;
  }

  .product-image-wrap {
    height: 380px;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .product-card {
    min-height: 440px;
  }

  .product-image-wrap {
    height: 340px;
  }
}

@media (max-width: 640px) {
  .shop-page {
    width: 100vw;
    max-width: 100vw;
    padding: 24px 12px 60px;
  }

  .shop-header {
    flex-direction: column;
    gap: 12px;
  }

  .shop-header-actions,
  .shop-top-links {
    width: 100%;
    justify-content: center;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-card {
    min-height: 400px;
  }

  .product-image-wrap {
    height: 300px;
  }

  .cart-sidebar {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .shop-page {
    padding: 20px 8px 50px;
  }

  .shop-search {
    width: 100%;
    max-width: 100%;
  }

  .product-card {
    min-height: 360px;
  }

  .product-image-wrap {
    height: 260px;
  }
}