/*
 * Imprex Main CSS - Kyte Inspired Custom UI
 */

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-secondary);
}

.site-branding {
  /* Absolute centering over the header */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  max-height: 32px;
  /* Set a reasonable height for header logos */
  width: auto;
  display: block;
}

.header-cart-icon {
  position: relative;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  /* Force to the right edge of the flex container */
}

.header-cart-icon .cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--color-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* ==========================================================================
   Responsive App Wrapper (Mobile vs Desktop Layout)
   ========================================================================== */
.app-wrapper {
  display: flex;
  flex-direction: column;
  margin-top: var(--header-height); /* Global mobile fix */
}

/* Mobile Menu Off-Canvas (App Sidebar) */
.app-sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 350px;
  height: 100vh;
  background: #f7f9fa;
  /* slightly different bg for sidebars looks good, or white */
  z-index: 1002;
  transition: left 0.3s ease;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.menu-open .app-sidebar {
  left: 0;
}

.sidebar-mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-mobile-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--color-secondary);
}

.btn-close-menu {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-secondary);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu Overlay */
.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.menu-open .side-menu-overlay {
  opacity: 1;
  visibility: visible;
}

.app-main-content {
  width: 100%;
}

@media (min-width: 992px) {
  .app-wrapper {
    display: grid;
    /* minmax(0,1fr) instead of 1fr is the KEY fix:
       plain 1fr sets min-width:auto so children can expand beyond it.
       minmax(0,1fr) forces the column to 0 as minimum, bounding it properly. */
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    margin-top: calc(var(--header-height) + 1rem);
  }

  /* Reset the container's max-width on the app-wrapper to allow more space */
  .app-wrapper.container {
    max-width: 1200px;
  }

  /* The sidebar becomes visible and natural part of layout */
  .app-sidebar {
    position: static;
    left: 0;
    width: auto;
    height: max-content;
    box-shadow: none;
    padding: 0;
    z-index: 1;
    overflow-y: visible;
    background: transparent;
  }

  /* Hide sidebar header and hamburger menu on desktop */
  .sidebar-mobile-header,
  .menu-toggle {
    display: none;
  }

  /* Main content has min-width: 0 to prevent grid blowout */
  .app-main-content {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Filter bar doesn't need to be sticky on desktop if sidebar is sticky */
  .app-main-content .filter-bar {
    position: static;
    margin-bottom: 2rem;
    padding-top: 0;
  }
}

/* ==========================================================================
   Desktop Left Sidebar Styling (Kyte clone)
   ========================================================================== */
.sidebar-block {
  background: white;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  /* Client reference has very light/no shadow, mostly relying on border */
}

.sidebar-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.sidebar-text {
  font-size: 0.9rem;
  color: var(--color-secondary);
  margin: 0;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-secondary);
}

.sidebar-list li svg {
  color: #888;
  flex-shrink: 0;
}

.sidebar-list a {
  color: inherit;
  text-decoration: none;
}

.sidebar-list a:hover {
  color: var(--color-primary);
}

/* Specific Lists */
.delivery-list li {
  display: block; /* override flex from .sidebar-list li */
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.accordion-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0.5rem 0;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-secondary);
  cursor: pointer;
  text-align: left;
}

.accordion-header svg {
  color: var(--color-secondary);
  transition: transform 0.3s ease;
}

.accordion-item.is-open .accordion-header svg {
  transform: rotate(180deg);
}

.accordion-item.is-open .accordion-header {
  font-weight: 500;
}

.accordion-content {
  display: none;
  padding: 0.25rem 0 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.accordion-item.is-open .accordion-content {
  display: block;
}

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

.accordion-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-secondary);
  line-height: 1.4;
}

.accordion-meta {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #666;
}

.category-list li a {
  display: block;
  font-weight: 600;
  padding: 0.5rem 0;
  color: #555;
  transition: all 0.2s;
}

.category-list li a.active,
.category-list li a:hover {
  color: var(--color-primary);
}

.category-list li a.active {
  background-color: var(--color-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  margin-left: -1rem;
  margin-right: -1rem;
}

/* ==========================================================================
   Home Page / Catalog
   ========================================================================== */

.home-hero img {
  width: 100%;
  border-radius: var(--border-radius-lg);
  margin-top: 1rem; /* Reduced: shared from .app-wrapper + local 1rem */
}

@media (min-width: 992px) {
  .home-hero img {
    margin-top: 0;
  }
}

/* Sticky Filter Bar */
.filter-bar {
  background: var(--color-surface);
  position: sticky;
  top: var(--header-height);
  z-index: 99;
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.filter-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.filter-btn,
.view-toggle {
  background: none;
  border: none;
  color: var(--color-secondary);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
}

.view-toggle.active {
  color: var(--color-primary);
}

.category-pills {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
  flex-grow: 1;
}

.category-pills::-webkit-scrollbar {
  display: none;
  /* Chrome */
}

.pill {
  white-space: nowrap;
  padding: 0.5rem 1rem;
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.pill.active {
  background-color: rgba(255, 87, 34, 0.1);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Product Section */
.section-title {
  font-size: 1.25rem;
  color: var(--color-primary);
  /* Orange theme */
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.see-all {
  font-size: 0.85rem;
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 500;
}

/* Catalog Section Container – must clip the horizontal scroll  */
.catalog-section {
  margin-bottom: 2rem;
  overflow: hidden;
  /* relative so arrows can be positioned inside */
  position: relative;
}

/* Slider Arrow Buttons (Desktop only) */
.slider-arrow {
  display: none;
  /* Hidden on mobile – touch/swipe handles it */
}

@media (min-width: 992px) {
  .slider-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, opacity 0.2s, transform 0.2s;
    opacity: 0;
    pointer-events: none;
  }

  .catalog-section:hover .slider-arrow {
    opacity: 1;
    pointer-events: auto;
  }

  .slider-arrow:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-50%) scale(1.08);
  }

  .slider-arrow svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .slider-arrow--prev {
    left: 4px;
  }

  .slider-arrow--next {
    right: 4px;
  }

  /* Hide prev arrow when at start, next when at end */
  .slider-arrow[data-hidden="true"] {
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Product Grid – Horizontal Scroll Slider */
.product-grid {
  display: flex;
  flex-direction: row;
  gap: 0.85rem;
  overflow-x: auto;
  /* scroll within this row only */
  width: 100%;
  /* must be 100% – lets parent constrain it */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Extra right padding shows the last card's shadow fully */
  padding-right: 1rem;
  padding-bottom: 0.5rem;
  box-sizing: border-box;
}

.product-grid::-webkit-scrollbar {
  display: none;
}

/* Each card – fixed width, never shrinks */
.product-grid>* {
  flex: 0 0 155px;
  scroll-snap-align: start;
}

@media (min-width: 600px) {
  .product-grid>* {
    flex: 0 0 175px;
  }
}

@media (min-width: 1024px) {
  .product-grid>* {
    flex: 0 0 195px;
  }
}

/* Product Card */
.kyte-product-card {
  background: var(--color-surface);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.kyte-product-link {
  display: block;
}

.kyte-product-image {
  position: relative;
  aspect-ratio: 1;
  background: #f0f0f0;
  /* loading fallback */
  overflow: hidden;
}

.kyte-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

/* Kyte specific: Action overlay in image */
.kyte-product-overlay-actions {
  position: absolute;
  bottom: 0px;
  right: 0px;
  z-index: 2;
}

.kyte-quick-add {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-top-left-radius: var(--border-radius);
}

.bg-primary {
  background-color: var(--color-primary);
}

.text-white {
  color: white;
}

.text-primary {
  color: var(--color-primary);
  font-weight: 700;
}

.kyte-product-details {
  padding: 1rem;
  text-align: center;
}

.kyte-product-title {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kyte-product-price {
  font-size: 1.1rem;
}

.ves-price {
  font-size: 0.8em;
  font-weight: 500;
  color: #777;
  margin-left: 4px;
  white-space: nowrap;
}

/* Force block display in narrow areas like the side cart or footer items */
.kyte-mini-cart-wrapper .ves-price,
.kyte-cart-card .ves-price,
.footer-bottom .ves-price {
  display: block;
  margin-left: 0;
  margin-top: 2px;
}

/* Hide separator when in block/stack mode */
.kyte-mini-cart-wrapper .price-separator,
.kyte-cart-card .price-separator,
.wc-block-checkout__sidebar .price-separator {
  display: none !important;
}

/* ==========================================================================
   Bottom Sticky Bar & Cart
   ========================================================================== */
.bottom-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-surface);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  /* Stronger shadow to separate from content */
  z-index: 900;
  height: max-content;
  /* Allow height to adjust */
  padding: 1rem 0;
  /* Add top/bottom padding */
  display: flex;
  align-items: center;
}

.bottom-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  /* Ensure full width inside container */
}

.cart-summary {
  display: flex;
  flex-direction: column;
}

.cart-total-price {
  font-weight: 800;
  /* Bolder price like Kyte */
  font-size: 1.25rem;
  color: var(--color-secondary);
}

.cart-item-count {
  font-size: 0.85rem;
  color: #666;
  /* Lighter text for item count */
  margin-top: -2px;
}

.btn-view-cart {
  padding: 0.75rem 1.5rem;
  gap: 0.5rem;
  font-size: 0.95rem;
  border-radius: var(--border-radius-full);
}

/* Side Cart Panel */
.side-cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.side-cart-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--color-surface);
  z-index: 1002;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

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

.cart-open .side-cart-panel {
  right: 0;
}

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

.side-cart-header h3 {
  margin: 0;
}

.btn-close-cart {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.side-cart-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Footer / Disclaimer */
.site-footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.8rem;
  color: #888;
}

/* ==========================================================================
   Kyte Mini Cart Panel Redesign
   ========================================================================== */

.side-cart-body {
  background-color: #f7f9fa;
  /* Light grey background from reference */
  padding: 0;
}

.kyte-mini-cart-wrapper {
  padding: 1rem 1.25rem;
}

.kyte-cart-header {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

.woocommerce-mini-cart {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* White Card for Cart Item */
.kyte-cart-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 0.75rem;
  display: flex !important;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-border);
  position: relative;
  margin-bottom: 0.75rem;
}

/* Close Button Floating on Card */
.kyte-cart-card .kyte-remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 20px;
  height: 20px;
  background: #f1f1f1;
  color: #666 !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0;
}

.kyte-cart-card .kyte-remove-btn:hover {
  background: #e0e0e0;
}

.kyte-cart-card .kyte-remove-btn svg {
  width: 12px;
  height: 12px;
}

/* Product Image in Card */
.kyte-cart-card-image {
  flex-shrink: 0;
  width: 55px;
  height: 55px;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kyte-cart-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Details Section */
.kyte-cart-card-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kyte-cart-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-secondary);
  margin: 0 0 0.15rem 0;
  padding-right: 1.5rem;
  /* space for absolute x button */
  line-height: 1.2;
}

.kyte-cart-title a {
  color: inherit;
}

/* Variations under title */
.kyte-cart-card-details dl.variation {
  font-size: 0.8rem;
  color: #888;
  margin: 0 0 0.25rem 0;
  border: none;
  padding: 0;
}

.kyte-cart-card-details dl.variation p {
  margin: 0;
}

.kyte-cart-card-details dl.variation dt {
  display: none;
}

.kyte-cart-card-details dl.variation dd {
  margin: 0;
}

/* Bottom Row inside Card */
.kyte-cart-price-action-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 0.25rem;
}

.kyte-cart-price {
  font-weight: 700;
  font-size: 1rem;
}

/* Actions: Trash and Qty inside Card */
.kyte-cart-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kyte-trash-btn {
  color: var(--color-primary);
  display: flex;
}

.kyte-trash-btn svg {
  width: 18px;
  height: 18px;
}

.kyte-qty-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-secondary);
}

.kyte-qty-value {
  border-bottom: 1px solid var(--color-primary);
  padding: 0 0.25rem;
}

.kyte-qty-plus {
  cursor: pointer;
  display: flex;
}

.kyte-qty-plus svg {
  width: 16px;
  height: 16px;
}

/* Empty Cart & More Products Links */
.kyte-cart-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.kyte-link-empty {
  color: #ff3b3b;
  text-decoration: underline;
  font-size: 0.85rem;
  font-weight: 500;
}

.kyte-link-more {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
}

.kyte-link-more svg {
  width: 16px;
  height: 16px;
}

/* Section Titles */
.kyte-section-title {
  font-size: 0.95rem;
  color: var(--color-secondary);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

/* Observation Box */
.kyte-cart-observation {
  margin-bottom: 1rem;
}

.observation-wrap {
  position: relative;
}

.observation-textarea {
  width: 100%;
  height: 65px;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  background: white;
  resize: none;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--color-secondary);
}

.observation-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.observation-count {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: #b0b0b0;
}

/* Delivery Method Box */
.kyte-cart-delivery {
  margin-bottom: 1rem;
}

.delivery-card {
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-secondary);
  text-decoration: none;
}

.delivery-icon-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.delivery-icon-wrap input[type="radio"] {
  accent-color: var(--color-primary);
  transform: scale(1.1);
  margin: 0;
}

.delivery-icon {
  color: #666;
  display: flex;
}

.delivery-icon svg {
  width: 18px;
  height: 18px;
}

.delivery-icon-wrap label span {
  font-weight: 600;
  font-size: 0.9rem;
}

.delivery-icon-wrap label small {
  font-weight: 400;
  color: #888;
  font-size: 0.8rem;
}

/* Total Section */
.kyte-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  margin: 0;
  /* Removed top border as it seems cleaner in the new ref */
}

.kyte-total-row span {
  font-size: 0.95rem;
  color: var(--color-secondary);
}

.kyte-total-row strong {
  font-size: 1.15rem;
  color: var(--color-secondary);
  font-weight: 800;
}

/* Main Checkout Button */
.kyte-buttons-row {
  margin: 0 0 1rem 0;
}

.kyte-checkout-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 1rem;
  background: var(--color-primary);
  color: white;
  border-radius: var(--border-radius-full);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 10px 0 rgba(255, 87, 34, 0.3);
}

.kyte-cart-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #888;
}

/* ==========================================================================
   Single Product Page (Kyte Clone)
   ========================================================================== */

.kyte-single-product {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  margin-top: 1rem;
}

.kyte-single-top-bar {
  margin-bottom: 1.5rem;
}

.kyte-back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-secondary);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.95rem;
  width: max-content;
}

.kyte-back-link:hover {
  color: var(--color-primary);
}

.kyte-single-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .kyte-single-main {
    flex-direction: row;
    align-items: flex-start;
  }

  .kyte-single-image {
    flex: 1;
    position: sticky;
    top: calc(var(--header-height) + 2rem);
  }

  .kyte-single-details {
    flex: 1;
  }
}

.kyte-single-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-lg);
  object-fit: contain;
  max-width: 500px;
  margin: 0 auto;
  display: block;
}

.kyte-item-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1.2;
  margin: 0 0 0.5rem 0;
}

.kyte-item-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #555;
  /* Secondary text color for price in Kyte */
  margin: 0 0 1.5rem 0;
}

.kyte-item-description {
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.kyte-desc-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

/* Kyte Variations Layout structure */
form.cart.kyte-variations-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.kyte-variations-container {
  margin-bottom: 0;
  width: 100%;
}

.kyte-attribute-group {
  margin-bottom: 0;
  /* Let form flex handle it */
}

.kyte-attr-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.kyte-attr-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-secondary);
}

.kyte-attr-hint {
  font-size: 0.75rem;
  color: var(--color-primary);
  line-height: 1.2;
  max-width: 200px;
  /* Forces wrap */
}

.kyte-swatches-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

.kyte-swatch {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-secondary);
  cursor: pointer;
  transition: all 0.2s;
  flex: 0 0 auto;
  text-align: center;
}

.kyte-swatch:hover {
  border-color: #bbb;
}

.kyte-swatch.active {
  background-color: transparent;
  border-color: var(--color-secondary);
  /* In reference it seems black border when active, or dark */
  color: var(--color-secondary);
  font-weight: 700;
}

/* Custom File Upload Box Removed */

/* Container holding Qty and Add to Cart Btn next to each other */
.single_variation_wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.woocommerce-variation-add-to-cart,
.woocommerce div.product form.cart {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
}

/* Quantity Container Styling */
.woocommerce div.product form.cart div.quantity.kyte-quantity {
  margin: 0;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #eaeaea;
  border-radius: var(--border-radius-full);
  background: white;
  width: 120px;
  height: 50px;
  padding: 0.25rem;
  flex-shrink: 0;
  /* Keep it fixed width */
}

/* Minus and Plus Buttons */
.kyte-qty-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 300;
  color: #333;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.2s;
  padding: 0;
  line-height: 1;
}

.kyte-qty-btn:hover {
  background: transparent;
  color: var(--color-primary);
}

/* The actual input text */
.woocommerce div.product form.cart div.quantity input.qty {
  width: 40px;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-secondary);
  padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.woocommerce div.product form.cart div.quantity input.qty::-webkit-outer-spin-button,
.woocommerce div.product form.cart div.quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Full-width Add to Cart Button */
.woocommerce div.product form.cart .button {
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 1rem !important;
  background-color: var(--color-primary) !important;
  color: white !important;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--border-radius-full) !important;
  line-height: 1.1;
  text-transform: none;
  box-shadow: 0 4px 14px 0 rgba(255, 87, 34, 0.35);
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

/* Native Woo Variations Price below swatches - keep it clean */
.woocommerce-variation-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.woocommerce-variation-availability {
  display: none;
}

/* Usually annoying on one page funnels */

/* ==========================================================================
   Archive / Shop / Category / Search Pages (Kyte Style)
   ========================================================================== */

.kyte-archive-page {
  padding: 0 0 4rem;
}

/* Archive page header */
.kyte-archive-header {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.kyte-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.kyte-back-link:hover {
  text-decoration: underline;
}

.kyte-archive-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-secondary);
  margin: 0.25rem 0 0.5rem;
}

.kyte-archive-desc {
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

.kyte-archive-meta {
  font-size: 0.8rem;
  color: #999;
}

/* The grid wrapper */
.kyte-archive-grid-wrap {
  padding: 0 1rem;
}

/* Override the horizontal-scroll slider behaviour for archive pages.
   On archive pages the grid should WRAP into a normal multi-column layout. */
.kyte-archive-page .product-grid,
.kyte-archive-grid {
  display: grid !important;
  /* override flex from product-grid */
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  overflow-x: visible !important;
  /* no horizontal scroll */
  width: auto;
  scroll-snap-type: none;
  padding-right: 0;
  padding-bottom: 0;
}

/* The card isn't flex: 0 0 fixed on archive, let the grid size it */
.kyte-archive-page .product-grid>*,
.kyte-archive-grid>* {
  flex: unset !important;
  scroll-snap-align: none;
  width: 100%;
}

@media (min-width: 600px) {

  .kyte-archive-page .product-grid,
  .kyte-archive-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {

  .kyte-archive-page .product-grid,
  .kyte-archive-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Hide the injected slider arrows on archive pages */
.kyte-archive-page .slider-arrow {
  display: none !important;
}

/* Hide WooCommerce loop start/end wrappers (we use our own grid) */
.kyte-archive-page .woocommerce .products.columns-3,
.kyte-archive-page .woocommerce ul.products {
  all: unset;
}

/* Pagination */
.kyte-archive-pagination {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

.kyte-archive-pagination .woocommerce-pagination ul {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.kyte-archive-pagination .woocommerce-pagination ul li span,
.kyte-archive-pagination .woocommerce-pagination ul li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.kyte-archive-pagination .woocommerce-pagination ul li a:hover,
.kyte-archive-pagination .woocommerce-pagination ul li span.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* Empty state */
.kyte-no-products {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 4rem 1rem;
  text-align: center;
  color: #aaa;
}

.kyte-no-products p {
  font-size: 1rem;
  color: #888;
}

.kyte-no-products .btn-primary {
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-lg);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
.site-footer {
  padding: 1.5rem 0 6rem 0;
  /* Added padding below to leave room for the bottom sticky bar */
  text-align: center;
  color: var(--color-secondary);
}

.site-footer .site-info {
  font-size: 0.85rem;
}

.site-footer .disclaimer {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

@media (max-width: 991px) {
  .site-footer {
    padding-bottom: 7rem;
    /* Leaves extra room for bottom sticky bar on mobile */
  }
}

/* WooCommerce notices on archive pages */
.kyte-archive-page .woocommerce-notices-wrapper {
  padding: 0 1rem;
  margin-bottom: 1rem;
}