/* ========================================
   BELBUY STORE - MAIN STYLESHEET
======================================== */

/* 1. Variables & Reset
======================================== */

:root {
  --black: #171717;
  --white: #ffffff;
  --gray: #777777;
  --light-gray: #f5f5f5;
  --border: #e9e9e9;
  --accent: #c47b45;
  --container: 1240px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  color: var(--black);
  background: var(--white);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}


/* 2. Header & Navigation
======================================== */

.header {
  height: 76px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.logo {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 2px;
}

.logo span {
  color: var(--accent);
}

.navigation {
  display: flex;
  gap: 35px;
}

.navigation a {
  position: relative;
  font-size: 16px;
  font-weight: 600;
  transition: color 0.25s ease;
}

.navigation a::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.navigation a:hover {
  color: var(--accent);
}

.navigation a:hover::after {
  width: 100%;
}

.navigation a:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* language button style */

.language-btn {
  border: 1px solid var(--border);
  background: var(--light-gray);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.language-btn:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.cart-btn {
  border: 0;
  background: transparent;
  font-size: 14px;
}

.cart-btn {
  background: var(--black);
  color: white;
  padding: 11px 18px;
  border-radius: 3px;
}

#cartCount {
  color: var(--accent);
  font-weight: bold;
  margin-inline-start: 5px;
}


/* 3. Hero Section
======================================== */

.hero {
  position: relative;
  width: 100%;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 7%;
}

.hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.65),
      rgba(0, 0, 0, 0.15));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 550px;
  color: white;
}

.hero-content .hero-label,
.hero-content h1,
.hero-content>p:not(.hero-label) {
  color: white;
}

.hero-label,
.section-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(35px, 5vw, 58px);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-content>p:not(.hero-label) {
  line-height: 1.8;
  margin-bottom: 30px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.primary-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
  padding: 14px 25px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease, color 0.3s ease;
}

.primary-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.hero-content .primary-btn {
  background: white;
  color: #111;
  border: 1px solid white;
}

.hero-content .primary-btn:hover {
  background: #B87333;
  color: white;
  border-color: #B87333;
}

.hero-image {
  min-height: 390px;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-placeholder {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #c9c9c9;
}


/* 4. Categories
======================================== */

.categories-section {
  max-width: var(--container);
  margin: auto;
  padding: 45px 30px 20px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 14px;
  background: var(--light-gray);
  border: 1px solid #e5e5e5;
  color: var(--black);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s;
}

.category-card:hover {
  border-color: var(--accent);
}

.category-image {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  margin: 0;
  overflow: hidden;
  background: var(--light-gray);
}

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

.category-card span:last-child {
  font-size: 14px;
  font-weight: 600;
}

.all-products-card .category-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.all-products-card .category-image i {
  width: 25px;
  height: 25px;
  stroke-width: 1.5;
}

.back-categories-btn {
  flex-shrink: 0;
  margin: 0;
  padding: 13px 16px;
  border: 1px solid #e5e5e5;
  background: var(--light-gray);
  color: var(--black);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}


/* 5. Products Section
======================================== */

.products-section {
  max-width: var(--container);
  margin: auto;
  padding: 65px 30px;
}

.section-heading {
  text-align: center;
  margin-bottom: 35px;
}

.section-heading h2 {
  font-size: 32px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px 18px;
}

.product-card {
  min-width: 0;
}

.product-open {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: start;
  color: inherit;
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--light-gray);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.product-card:hover .product-image img {
  transform: scale(1.04);
}

.product-image span {
  color: #bbb;
  font-weight: bold;
  letter-spacing: 3px;
}

.product-card:has(.quick-add-btn.out-of-stock) .product-image img {
  opacity: 0.65;
}

.product-info {
  padding: 13px 0;
}

.product-info h3 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.product-info p {
  font-weight: 700;
  font-size: 15px;
  color: var(--black);
  letter-spacing: 0.2px;
}

.product-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-prices .current-price {
  font-weight: 700;
  color: #111;
  margin: 0;
}

.product-prices .old-price {
  font-size: 13px;
  color: #888;
  text-decoration: line-through;
  margin: 0;
}

.discount-badge {
  background: #fff0e8;
  color: #c65d24;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 3px;
}

.quick-add-btn {
  width: 100%;
  border: 1px solid var(--black);
  padding: 12px;
  background: var(--black);
  color: white;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}

.quick-add-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.cart-stock-warning {
  margin-top: 6px;
  padding: 7px 10px;
  background: #fff4e8;
  color: #b45f16;
  font-size: 12px;
  border-radius: 4px;
  line-height: 1.5;
}


/* 6. Products Toolbar, Search & Filters
======================================== */

.products-toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}


.products-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  width: 100%;
  max-width: 420px;
  margin: 0;
}

.products-search input {
  width: 100%;
  height: 44px;
  padding: 0 42px;
  border: 1px solid #e5e5e5;
  background: var(--light-gray);
  color: var(--black);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.products-search input:focus {
  border-color: var(--accent);
}

.products-search input::placeholder {
  color: #888;
}

.products-search input::-webkit-search-cancel-button {
  display: none;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: #777;
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #777;
  cursor: pointer;
}

.clear-search-btn[hidden] {
  display: none;
}

.clear-search-btn svg {
  width: 17px;
  height: 17px;
}

.products-sort,
.category-filter {
  flex-shrink: 0;
}

.products-sort select,
.category-filter select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e5e5;
  background: var(--light-gray);
  color: var(--black);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.products-sort select:focus,
.category-filter select:focus {
  border-color: var(--accent);
}


/* 7. Show More Products
======================================== */

.show-more-container {
  display: flex;
  justify-content: center;
  margin: 35px 0;
}

#showMoreProducts {
  min-width: 180px;
  height: 44px;
  padding: 0 25px;
  border: 1px solid var(--black);
  background: white;
  color: var(--black);
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
}

#showMoreProducts:hover {
  background: var(--black);
  color: white;
}


/* 8. About Section
======================================== */

.about-section {
  padding: 75px 20px;
  background: var(--light-gray);
  text-align: center;
}

.about-section h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.about-section h3 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 15px;
}

.about-section p {
  max-width: 650px;
  margin: auto;
  color: var(--gray);
  line-height: 1.8;
  font-size: 15px;
}


/* 9. Footer
======================================== */

.footer {
  background: #111;
  color: white;
  padding: 55px 7% 0;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  max-width: 1200px;
  margin: auto;
  padding-bottom: 40px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-column h3 {
  font-size: 20px;
  letter-spacing: 1.5px;
  margin-bottom: 5px;
}

.footer-column h4 {
  font-size: 15px;
  margin-bottom: 5px;
}

.footer-column p {
  color: #aaa;
  font-size: 14px;
  line-height: 1.8;
  max-width: 100%;
}

.footer-column a {
  color: #aaa;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: #B87333;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  color: #888;
  font-size: 13px;
  margin: 0;
}


/* 10. Modals - General
======================================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  background: white;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
}

.close-modal {
  position: absolute;
  top: 12px;
  inset-inline-end: 15px;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: white;
  font-size: 30px;
  line-height: 1;
  z-index: 2;
}

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


/* 11. Product Quick View
======================================== */

.product-modal-content {
  width: 100%;
  max-width: 1050px;
  padding: 35px;
  border-radius: 5px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: start;
  padding-top: 10px;
}

.detail-gallery {
  min-width: 0;
}

.detail-image-wrap {
  position: relative;
  width: 100%;
}

.detail-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 650px;
  background: var(--light-gray);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.detail-thumbnail {
  flex: 0 0 70px;
  width: 70px;
  height: 85px;
  padding: 0;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  overflow: hidden;
}

.detail-thumbnail.selected {
  border: 2px solid var(--black);
}

.detail-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-image-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--black);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-image-prev {
  left: 12px;
}

.detail-image-next {
  right: 12px;
}

.detail-image-arrow:hover {
  background: var(--black);
  color: white;
}

.detail-info {
  padding: 15px 0;
}

.detail-brand {
  color: var(--accent);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.detail-info h2 {
  font-size: 27px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.detail-price {
  font-size: 23px;
  font-weight: bold;
  margin-bottom: 20px;
}

.detail-description {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray);
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.detail-option-group {
  margin-top: 23px;
}

.detail-option-group label,
.detail-quantity label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 12px;
}

.option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.option-button {
  min-width: 43px;
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: white;
  font-size: 13px;
  transition: 0.2s;
}

.option-button:hover {
  border-color: var(--black);
}

.option-button.selected {
  border-color: var(--black);
  background: var(--black);
  color: white;
}

.detail-stock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  padding: 15px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.stock-label {
  font-size: 13px;
  color: var(--accent);
  margin: 0;
  font-weight: bold;
}

.detail-quantity {
  margin: 22px 0;
}

.quantity-input {
  width: 100px;
  height: 42px;
  padding: 10px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.full-btn {
  width: 100%;
}

#addProductButton {
  min-height: 48px;
  font-weight: bold;
  letter-spacing: 0.3px;
}

#addProductButton:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
}


/* 12. Product Image Zoom
======================================== */

.image-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
}

.image-zoom-overlay img {
  max-width: 95%;
  max-height: 92vh;
  object-fit: contain;
}

.image-zoom-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: white;
  font-size: 35px;
  background: none;
  border: none;
  cursor: pointer;
}

.image-zoom-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.image-zoom-prev {
  left: 25px;
}

.image-zoom-next {
  right: 25px;
}

.image-zoom-arrow:hover {
  background: #111;
  color: white;
}


/* 13. Cart Drawer
======================================== */

.cart-modal-content {
  max-width: 650px;
}

.cart-modal-content h2,
.checkout-modal-content h2 {
  font-size: 23px;
  margin-bottom: 25px;
}

.cart-item {
  display: grid;
  grid-template-columns: 85px 1fr auto;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cart-item img {
  width: 85px;
  height: 105px;
  object-fit: cover;
  background: var(--light-gray);
}

.cart-item-info h3 {
  font-size: 14px;
  margin-bottom: 7px;
}

.cart-item-info p {
  color: var(--gray);
  font-size: 12px;
  margin-bottom: 7px;
}

.cart-item-info strong {
  font-size: 13px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.quantity-controls button {
  width: 27px;
  height: 27px;
  border: 1px solid var(--border);
  background: white;
}

.remove-item {
  border: 0;
  background: transparent;
  color: #a33;
  font-size: 12px;
}

.empty-cart {
  text-align: center;
  padding: 35px 10px;
  color: var(--gray);
}

.cart-summary {
  padding: 20px 0;
}

.cart-summary>div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
  font-size: 14px;
}

.cart-total {
  padding-top: 15px;
  border-top: 1px solid var(--border);
  font-size: 17px !important;
  font-weight: bold;
}


/* 14. Checkout Drawer
======================================== */

.checkout-modal-content {
  width: 100%;
  max-width: 650px;
  margin-left: auto;
  margin-right: 0;
}

#checkoutModal .checkout-modal-content>h2 {
  flex-shrink: 0;
  font-size: 23px;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.checkout-modal-content h3 {
  margin-bottom: 20px;
}

#checkoutStep1 h3,
#checkoutStep2 h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.checkout-modal-content label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin: 15px 0 7px;
}

.checkout-modal-content input,
.checkout-modal-content textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  padding: 12px;
  outline: none;
  resize: vertical;
}

.checkout-modal-content input:focus,
.checkout-modal-content textarea:focus {
  border-color: var(--accent);
}

.checkout-modal-content textarea {
  min-height: 80px;
}

.checkout-modal-content form>label:first-child {
  margin-top: 0;
}

.checkout-message {
  color: #a33;
  font-size: 13px;
  margin: 12px 0;
}


/* 15. Checkout Steps
======================================== */

.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #999;
}

.checkout-step span {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-step.active {
  color: var(--accent);
}

.checkout-step.active span {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.checkout-step-line {
  width: 55px;
  height: 1px;
  background: var(--border);
}


/* 16. Checkout Order Summary
======================================== */

.checkout-summary-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 12px;
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.checkout-summary-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 5px 15px;
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.checkout-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.checkout-summary-item img {
  width: 65px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.checkout-summary-info {
  flex: 1;
  min-width: 0;
}

.checkout-summary-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.checkout-summary-info p,
.checkout-summary-info small {
  color: var(--gray);
}

.checkout-summary-info p {
  margin: 5px 0;
  font-size: 12px;
}

.checkout-summary-info small {
  font-size: 12px;
}

.checkout-summary-item>strong {
  font-size: 13px;
  white-space: nowrap;
}


/* Checkout totals */

.checkout-summary-totals {
  flex-shrink: 0;
  margin: 0;
  padding: 12px 15px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.checkout-summary-totals p,
.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
}

.checkout-summary-totals p {
  font-size: 14px;
}

.checkout-summary-totals p span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-summary-totals p span i {
  font-size: 16px;
}

.checkout-summary-total {
  padding-top: 15px;
  border-top: 1px solid var(--border);
  font-size: 17px !important;
  font-weight: bold;
}

.checkout-summary-total strong {
  color: var(--accent);
  font-size: inherit;
  font-weight: inherit;
}


/* 17. Checkout Actions & Buttons
======================================== */

.checkout-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  margin-top: auto;
  padding: 18px 0 0;
  background: white;
  border-top: 1px solid var(--border);
}

#checkoutStep2 .checkout-actions {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.secondary-btn {
  background: var(--light-gray);
  color: var(--black);
  border: 1px solid var(--border);
  padding: 12px 18px;
  cursor: pointer;
}

#submitOrderBtn {
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
  font-weight: 600;
}

#submitOrderBtn:hover {
  background: #ad6838;
  border-color: #ad6838;
}

#submitOrderBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* 18. Shared Side Drawer Layout
======================================== */

#cartModal,
#checkoutModal {
  justify-content: flex-end;
  padding: 0;
}

#cartModal .cart-drawer,
#checkoutModal .checkout-modal-content {
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  margin: 0 0 0 auto;
  padding: 30px;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#cartModal .cart-drawer {
  max-width: 450px;
}

#checkoutModal .checkout-modal-content {
  max-width: 650px;
}

/* Cart header */

.cart-drawer-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cart-drawer-header h2 {
  margin: 0;
}

/* Scrollable areas */

.cart-drawer-items,
#checkoutForm {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.cart-drawer-footer {
  flex-shrink: 0;
  background: white;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}

/* Checkout form layout */

#checkoutForm {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

#checkoutStep1,
#checkoutStep2 {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#checkoutStep1[hidden],
#checkoutStep2[hidden] {
  display: none !important;
}

#checkoutStep2 {
  overflow: hidden;
}

#checkoutStep2 h3 {
  flex-shrink: 0;
}

#checkoutOrderSummary {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}


/* 19. Order Success
======================================== */

.order-success {
  text-align: center;
  padding: 28px 20px;
}

.order-success h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.order-success p {
  color: var(--gray);
  margin-bottom: 20px;
  line-height: 1.6;
}

.order-success .order-number {
  background: #f7f7f7;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px;
  margin: 24px 0;
  color: #333;
}

.order-success .order-number strong {
  display: block;
  color: var(--accent);
  font-size: 23px;
  margin-top: 6px;
  letter-spacing: 1px;
}

.order-success #whatsappLink {
  display: block;
  margin-top: 20px;
}

.order-success .success-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e8b57;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: bold;
}

.order-success .success-title {
  color: var(--text);
  margin-bottom: 10px;
}

.success-thank-you {
  margin: 22px 0 4px;
  font-size: 14px;
  color: #666;
  font-weight: 400;
  text-align: center;
}

.success-thank-you+strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #c47b45;
  text-align: center;
}


/* 20. RTL Support
======================================== */

html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .product-info,
html[dir="rtl"] .cart-item-info {
  text-align: right;
}

html[dir="rtl"] .cart-summary>div {
  flex-direction: row;
}


/* 21. Responsive Styles
======================================== */

/* Large screens */

@media (min-width: 1440px) {
  .hero {
    min-height: 600px;
    padding-left: 9%;
    padding-right: 9%;
  }

  .hero-content {
    max-width: 620px;
  }
}


/* Tablets */

@media (max-width: 900px) {
  .categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* Mobile */

@media (max-width: 600px) {
  /* Categories */

  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .category-card {
    gap: 8px;
    padding: 8px;
  }

  .category-image {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .category-card span:last-child {
    font-size: 12px;
  }

  /* Products toolbar */

  .products-toolbar {
    gap: 8px;
  }

  .back-categories-btn {
    padding: 12px 9px;
    font-size: 11px;
  }

  .products-search {
    min-width: 0;
  }

  .products-search input {
    font-size: 12px;
    padding: 0 10px;
  }

  .products-sort select {
    max-width: 105px;
    padding: 0 6px;
    font-size: 11px;
  }

  .category-filter select {
    max-width: 125px;
    padding: 0 6px;
    font-size: 11px;
  }

  /* Footer */

  .footer {
    padding: 40px 6% 0;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 30px 20px;
  }

  .footer-column:first-child {
    grid-column: 1 / -1;
  }

  /* Image zoom */

  .image-zoom-arrow {
    width: 40px;
    height: 40px;
  }

  .image-zoom-prev {
    left: 10px;
  }

  .image-zoom-next {
    right: 10px;
  }

  /* Drawers */

  #cartModal .cart-drawer,
  #checkoutModal .checkout-modal-content {
    max-width: 100%;
    padding: 20px;
  }

  /* Checkout */

  .checkout-actions {
    flex-direction: column-reverse;
  }

  .checkout-actions button {
    width: 100%;
  }

  .checkout-summary-item {
    gap: 10px;
  }

  .products-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "category sort"
      "search search"
      ". toggle";
    align-items: center;
    gap: 12px 8px;
  }

  .category-filter {
    grid-area: category;
    min-width: 0;
  }

  .products-search {
    grid-area: search;
    width: 100%;
    min-width: 0;
  }

  .products-sort {
    grid-area: sort;
  }

  .availability-toggle {
    grid-area: toggle;
    justify-self: end;
    margin: 0 10px 0 0;
  }

  .category-filter select,
  .products-sort select {
    width: 100%;
    max-width: none;
    height: 38px;
    font-size: 12px;
    padding: 0 8px;
  }

  .availability-toggle {
    justify-self: end;
    margin-right: 10px;
  }

  .product-prices {
    min-height: 22px;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
  }

  .product-prices .old-price {
    font-size: 11px;
  }

  .discount-badge {
    font-size: 10px;
    padding: 2px 4px;
  }
}


/* Order Confirmation Popup */

#orderConfirmModal {
  z-index: 110;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.order-confirm-content {
  width: 100%;
  max-width: 420px;
  max-height: none;
  padding: 35px 30px 25px;
  border-radius: 5px;
  text-align: center;
  overflow: visible;
}

.order-confirm-content h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 15px;
}

.order-confirm-content p {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 25px;
}

.order-confirm-content .checkout-actions {
  justify-content: center;
  gap: 10px;
  margin-top: 0;
  padding-top: 20px;
}

.order-confirm-content .checkout-actions button {
  flex: 1;
  min-height: 44px;
}

#acceptOrderConfirm {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

#acceptOrderConfirm:hover {
  background: #ad6838;
  border-color: #ad6838;
}

@media (max-width: 600px) {
  .order-confirm-content .checkout-actions {
    flex-direction: row;
  }

  .order-confirm-content {
    padding: 35px 22px 22px;
  }
}

/* Order Processing Loader */

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

.btn-loader:not([hidden]) {
  display: inline-block;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.category-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#shareCategoryBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #888;
  cursor: pointer;
}

#shareCategoryBtn[hidden] {
  display: none;
}

#shareCategoryBtn:hover {
  color: var(--accent);
}

#shareCategoryBtn i {
  width: 17px;
  height: 17px;
}

.availability-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 10px;
}

[dir="rtl"] .availability-toggle {
  margin-left: 10px;
  margin-right: auto;
}

.availability-toggle input {
  display: none;
}

.availability-switch {
  position: relative;
  width: 38px;
  height: 22px;
  background: #d1d1d1;
  border-radius: 20px;
  transition: background 0.2s;
}

.availability-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.availability-toggle input:checked+.availability-switch {
  background: var(--accent);
}

.availability-toggle input:checked+.availability-switch::before {
  transform: translateX(16px);
}

.navigation a.active {
  color: var(--accent);
}

.navigation a.active::after {
  width: 100%;
}