@import url("shop_master.css");

.top-strip {
  background: #202020;
  color: #ffffff;
  font-size: 0.9rem;
}

.top-strip .wrap,
footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.site-header-dark {
  background: #000000;
}

.header-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  justify-content: space-between;
}


.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  white-space: nowrap;
}

.search {
  display: flex;
  flex: 1 1 320px;
  width: 100%;
  max-width: 560px;
  min-width: 0;
  overflow: hidden;
  /* border: 2px solid var(--brand); */
  border-radius: 33px;
  background: #ffffff;
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0.85rem 1rem;
  outline: 0;
}

.search button {
  width: 54px;
  background: var(--brand);
  color: #ffffff;
  border: 0;
  &:hover {
    transform: none;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 240px;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.icon-button {
  min-width: 46px;
  height: 46px;
  padding: 0 0.75rem;
  /* border: 1px solid var(--line); */
  border-radius: 6px;
  background: var(--brand);
  /* color: var(--ink); */
  color: #ffffff;
}

.cart-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #171717;
  font-size: 0.78rem;
  font-weight: 900;
}

main {
  padding: 1.5rem 1rem 2.75rem;
}

.shop-toolbar,
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.shop-toolbar h1,
.page-head h1 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.user-greeting {
  font-size: 0.9rem;
  color: #ffffff;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #1f1f1f;
  flex: 0 0 auto;
}

.user-avatar-fallback {
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.toolbar-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.product-card,
.panel,
.option-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.product-link {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.product-media,
.detail-media {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fafafa, #eceff2);
}

.product-media {
  aspect-ratio: 1 / 1;
  border-bottom: 1px solid var(--line);
  max-height: 280px;
}

.product-media svg {
  width: min(76%, 210px);
  height: auto;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.9rem;
  background: white;
}

.badge {
  align-self: flex-start;
  margin-bottom: 0.55rem;
  padding: 0.22rem 0.45rem;
  border-radius: 4px;
  background: #e9f6ef;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-card h2 {
  min-height: 48px;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.rating {
  margin-bottom: 0.55rem;
  color: #a56c00;
  font-size: 0.9rem;
  font-weight: 800;
}

.price-row,
.summary-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.price {
  color: var(--brand);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.old-price {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: line-through;
  white-space: nowrap;
}

.stock {
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: right;
}

.stock-out {
  color: var(--red);
}

.out-of-stock {
  opacity: 0.45;
  filter: grayscale(1);
}

.out-of-stock .stock {
  color: var(--red);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.card-actions,
.row-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  
}

.mt-1 {
  margin-top: 1rem;
}

.mt-065 {
  margin-top: 0.65rem;
}

.mb-0 {
  margin-bottom: 0;
}

.text-small {
  font-size: 0.85rem;
}

.lookup-form {
  display: grid;
  gap: 0.8rem;
  max-width: 520px;
}

.lookup-email-input {
  padding: 0.7rem;
  border: 1px solid #d9dee8;
  border-radius: 10px;
}

.card-actions {
  padding: 0 0.9rem 0.9rem;
  background: white;
}

.add-cart-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.add-cart-expanded {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.add-cart-expanded[hidden] {
  display: none !important;
}

.add-cart-qty-input {
  width: 104px;
  min-width: 6ch;
  min-height: 44px;
  border: 1px solid #d6dbe4;
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  background: #ffffff;
  font-size: 1rem;
  text-align: center;
}

.shop-add-feedback {
  margin: 0 0 1rem 0;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: var(--brand);
  color: #ffffff;
}

.primary-button:hover,
.secondary-button:hover {
  background: var(--brand-dark);
}


.link-button {
  min-height: 42px;
  padding: 0.7rem 0.9rem;
  /* border: 1px solid var(--line); */
  border-radius: 6px;
  /* background: #ffffff; */
  background: var(--brand);
  /* color: var(--ink); */
  color: #ffffff;
}

.link-button {
  background: #202020;
  color: #ffffff;
}

.detail-layout,
.checkout-layout,
.option-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.detail-media {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-media svg {
  width: min(82%, 430px);
  height: auto;
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.detail-gallery-panel {
  margin-top: 1rem;
}

.detail-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.detail-gallery-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.detail-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel {
  padding: 1.1rem;
  margin-top: 1rem;
}

/* .option-grid > *, */
.option-card + .option-card {
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.zip-field-wrap {
  position: relative;
}

.postcode-bubble {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 0.55rem);
  z-index: 3;
  background: #fff4f2;
  border: 1px solid #f0b8b4;
  border-radius: 8px;
  padding: 0.7rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.postcode-bubble::after {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 100%;
  width: 10px;
  height: 10px;
  background: #fff4f2;
  border-right: 1px solid #f0b8b4;
  border-bottom: 1px solid #f0b8b4;
  transform: translateY(-5px) rotate(45deg);
}

.postcode-bubble p {
  margin: 0 0 0.5rem;
  color: var(--red);
  font-weight: 800;
}

.bubble-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.bubble-action {
  display: inline-flex;
  border: 1px solid #e59a95;
  background: #ffffff;
  color: #8f1f17;
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.bubble-action:hover {
  background: #fff0ee;
}

.bubble-action-secondary {
  border-color: #c9ced8;
  color: #344054;
}

.bubble-action-secondary:hover {
  background: #f6f8fb;
}

.input-error-highlight {
  border-color: #d92d20 !important;
  box-shadow: 0 0 0 2px rgba(217, 45, 32, 0.2);
  background: #fff7f6;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 800;
}

input[type="text"],
input[type="email"],
input[type="number"],
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c9ced8;
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
  background: #ffffff;
}

.country-combobox {
  position: relative;
}

.country-combobox-shell {
  position: relative;
}

.country-combobox-input {
  padding-right: 3rem !important;
}

.country-combobox-toggle {
  position: absolute;
  /* top: 50%; */
  right: 0.2rem;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  /* transform: translateY(-50%); */
}

.country-combobox-toggle:hover,
.country-combobox-toggle:focus-visible {
  background: #eef2f7;
  outline: none;
  transform: none;
}

.country-combobox-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 30;
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.country-combobox-empty {
  padding: 0.85rem 0.9rem;
}

.country-combobox-list {
  display: grid;
  max-height: 280px;
  overflow-y: auto;
}

.country-combobox-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #101828;
  text-align: left;
}

.country-combobox-option + .country-combobox-option {
  border-top: 1px solid #eef2f6;
}

.country-combobox-option:hover,
.country-combobox-option:focus-visible,
.country-combobox-option.is-active {
  background: #f8fafc;
  outline: none;
}

.country-combobox-option.is-selected {
  background: #edf5ff;
}

.country-combobox-option-name {
  min-width: 0;
}

.country-combobox-option-code {
  color: #475467;
  font-size: 0.9rem;
  font-weight: 800;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.cart-table th:last-child,
.cart-table td:last-child {
  text-align: right;
}

.cart-product-cell {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cart-product-thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, #fafafa, #eceff2);
}

.cart-product-thumb img,
.cart-product-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-product-thumb svg {
  padding: 0.35rem;
}

.cart-product-copy {
  min-width: 0;
}

.qty-input {
  width: 104px;
  min-width: 6ch;
  min-height: 42px;
  font-size: 1rem;
  text-align: center;
}

.cart-qty-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-remove-button {
    /* width: 34px; */
    /* min-width: 34px; */
    /* height: 34px; */
    border: 1px solid #d6dbe4;
    /* border-radius: 999px; */
    background: #ffffff;
    color: var(--red);
    /* cursor: pointer; */
    /* font-size: 1.1rem; */
    /* font-weight: 900; */
    line-height: 1;
}

.cart-remove-button:hover,
.cart-remove-button:focus-visible {
  border-color: var(--red);
  background: #f316001f;
  outline: none;
}

.cart-live-feedback {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.summary {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.summary-items {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.summary-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.summary-item-copy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.summary-item-thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, #fafafa, #eceff2);
}

.summary-item-thumb img,
.summary-item-thumb svg {
  width: 100%;
  height: 100%;
}

.summary-item-thumb img {
  object-fit: cover;
}

.summary-item-thumb svg {
  padding: 0.3rem;
}

.summary-item-meta {
  margin-top: 0.2rem;
  font-size: 0.9rem;
}

.cart-value-flash {
  animation: cartValueFlash 280ms ease;
}

@keyframes cartValueFlash {
  0% {
    transform: scale(1);
    color: inherit;
  }
  45% {
    transform: scale(1.08);
    color: var(--brand-dark);
  }
  100% {
    transform: scale(1);
    color: inherit;
  }
}

.summary-total {
  padding-top: 0.75rem;
  border-top: 2px solid var(--line);
  font-size: 1.2rem;
  font-weight: 900;
}

.option-card {
  padding: 1rem;
}

.shipping-choice-form {
  display: grid;
  gap: 0.85rem;
}

.shipping-choice-submit {
  display: none;
}

.shipping-choice-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.shipping-choice-item.is-active {
  border-color: #344054;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.shipping-choice-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.shipping-choice-head-static {
  cursor: default;
}

.shipping-choice-head input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0.35rem 0 0;
}

.shipping-choice-main {
  display: grid;
  flex: 1;
  gap: 0.2rem;
}

.shipping-choice-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.shipping-choice-body {
  display: grid;
  gap: 0.7rem;
  padding: 0 1rem 1rem 2.5rem;
}

.shipping-choice-body-static {
  padding: 0 1rem 1rem;
}

.shipping-choice-item-static {
  display: grid;
  gap: 0;
}

.shipping-choice-action {
  width: 100%;
}

.shipping-choice-picker-label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 800;
}

.shipping-choice-pickup-dropdown {
  position: relative;
}

.shipping-choice-pickup-trigger {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #c9ced8;
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  text-align: left;
  &:hover {
    border-color: #344054;
    background: #f5f7fb;
  }
}

.shipping-choice-pickup-trigger-copy,
.shipping-choice-pickup-copy {
  display: grid;
  gap: 0.15rem;
  font-size: 0.98rem;
  line-height: 1.35;
}

.shipping-choice-pickup-trigger-icon {
  flex: 0 0 auto;
  font-size: 0.9rem;
  line-height: 1;
  margin-top: 0.35rem;
}

.shipping-choice-pickup-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  gap: 0.45rem;
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid #c9ced8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.shipping-choice-pickup-menu[hidden] {
  display: none;
}

.shipping-choice-pickup-option {
  width: 100%;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  text-align: left;
}

.shipping-choice-pickup-option.is-selected,
.shipping-choice-pickup-option:hover,
.shipping-choice-pickup-option:focus-visible {
  border-color: #344054;
  background: #f5f7fb;
  outline: none;
}

.shipping-choice-location {
  margin: 0;
}

.carrier-tag {
  display: inline-flex;
  margin-bottom: 0.45rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #eef2f8;
  color: #344054;
  font-size: 0.8rem;
  font-weight: 900;
}

.alert.good {
  border-color: #b8dfc4;
}

.alert.bad {
  border-color: #f0b8b4;
}

.alert.warn {
  border-color: #edd69b;
}

.empty {
  padding: 2rem;
  border: 1px dashed #c9ced8;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

footer {
  background: #202020;
  color: #ffffff;
  padding: 1.2rem 0;
}

footer .wrap {
  color: #dedede;
  font-size: 0.95rem;
}

@media (max-width: 950px) {
  .header-main {
    align-items: stretch;
  }

  .search {
    flex-basis: 100%;
    max-width: none;
    order: 3;
  }

  .header-actions {
    margin-left: auto;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout,
  .checkout-layout,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .detail-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .top-strip .wrap,
  footer .wrap,
  .shop-toolbar,
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions .icon-button span:not(.cart-count) {
    display: none;
  }

  .header-main {
    align-items: stretch;
  }

  .search,
  .header-actions {
    flex-basis: 100%;
  }

  .header-actions {
    justify-content: space-between;
  }

  .user-greeting {
    width: 100%;
  }

  .search input {
    min-width: 0;
  }

  .product-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .detail-gallery-grid {
    grid-template-columns: 1fr;
  }

  .cart-table {
    font-size: 0.9rem;
  }
}
