:root {
  --bg: #f8f9fa;
  /* Very light grey for a clean backdrop */
  --surface: #ffffff;
  /* Pure white for distinct elements like cards, modals, etc. */
  --text: #212529;
  /* Deep charcoal for main text */
  --muted: #6c757d;
  /* Muted grey for secondary text */
  --accent: #3CB371;
  /* A fresh, vibrant medium sea green for a more inviting feel */
  --accent-hover: #309569;
  /* Darker shade of accent for hover states */
  --accent-focus-ring: rgba(60, 179, 113, 0.2);
  /* Light transparent accent for focus rings */
  --danger: #dc3545;
  /* Standard red for danger */
  --success-color: #218838;
  /* Darker green for success */
  --radius: 12px;
  /* Slightly larger border radius for a softer, modern look */
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  /* Softer, slightly deeper shadows */
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);
  /* More pronounced large shadow */
  font-family: 'Ubuntu Sans', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  /* New elegant font */
  font-size: 16px;
  /* Base font size */
  --header-height: 70px;
  /* Define a consistent header height */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[x-cloak] {
  display: none !important;
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  /* Improved line height */
}

body.menu-open {
  overflow: hidden;
  /* Prevent scrolling when mobile menu is open */
}

.container {
  max-width: 1200px;
  /* Slightly wider container */
  margin: 0 auto;
  padding: 20px;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.5s ease-out;
  opacity: 1;
  visibility: visible;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader .spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid var(--accent);
  /* Use new accent color */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.preloader p {
  font-size: 1.1rem;
  color: var(--muted);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Header */
.site-header {
  border-bottom: 1px solid #eee;
  background: var(--surface);
  /* Use surface color */
  position: sticky;
  top: 0;
  z-index: 50;
  /* Ensure header is above main-nav and other overlays */
  box-shadow: var(--shadow);
  /* Add shadow to header */
  min-height: var(--header-height);
  /* Ensure minimum height */
  display: flex;
  /* Make it a flex container to center header-inner */
  align-items: center;

}

.header-inner {
  max-width: 1200px;
  /* Slightly wider container */
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  /* Allow wrapping on smaller screens */
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  /* Spacing between header elements */
  width: 100%;
  /* Take full width of container */
}

.brand {
  font-weight: 700;
  margin: 0;
  /* Remove default margin */
  font-size: 22px;
  /* Slightly larger brand text */
  color: var(--accent);
  /* Brand color */
  display: flex;
  /* Allow image to be centered vertically if needed */
  align-items: center;
}

.brand-logo {
  height: 60px;
  /* Fixed height for the logo */
  width: auto;
  /* Allow width to adjust proportionally */
  object-fit: contain;
  /* Ensure the logo fits within its bounds without cropping */
  border-radius: 0;
  /* No border radius */
  box-shadow: none;
  /* No shadow */
  background-color: transparent;
  /* No background */
  padding: 0;
  /* No padding */
  max-width: 150px;
  /* Limit width to prevent it from getting too big */
}

/* Main Navigation */
.main-nav {
  flex-grow: 1;
  margin-left: 20px;
  z-index: 96;
  /* Higher than header, below toggle */
}

.main-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

.menu-item {
  position: relative;
}

.main-menu>li>a {
  /* Apply to top-level menu items only */
  display: block;
  padding: 10px 0;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s ease;
}

.main-menu>li>a:hover,
.main-menu>li>a:focus {
  color: var(--accent);
}

.has-submenu>a::after {
  content: ' ▼';
  font-size: 0.7em;
  margin-left: 5px;
  transition: transform 0.2s ease;
}

.has-submenu>a[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.submenu {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  z-index: 30;
}

/* Desktop: General submenu visibility on hover/focus/expanded */
.menu-item.has-submenu:hover>.submenu,
.menu-item.has-submenu:focus-within>.submenu,
.menu-item.has-submenu>a[aria-expanded="true"]+.submenu {
  opacity: 1;
  visibility: visible;
}

/* Styles for individual links within any submenu (category, restaurant, promotions) */
.submenu li a {
  display: block;
  padding: 8px 20px;
  /* Consistent padding for all submenu items */
  text-decoration: none;
  color: var(--text);
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.submenu li a:hover,
.submenu li a:focus {
  color: var(--accent);
  background-color: var(--bg);
}

/* The .category-submenu specific styles are mostly absorbed by the generic .submenu and .submenu li a rules now.
   Keeping this class for semantic clarity, but its specific CSS rules might be redundant or minimal. */
.category-submenu {
  /* No specific overrides needed here beyond what .submenu already provides
     if .submenu li a correctly styles the child links. */
  /* Re-asserting properties for clarity in case future base .submenu changes */
  display: block;
  min-width: 180px;
  max-width: 300px;
  left: 0;
}

/* Adjust visibility/transform for the simple category submenu on hover/focus/expanded (desktop) */
.menu-item.has-submenu:hover>.category-submenu,
.menu-item.has-submenu:focus-within>.category-submenu,
.menu-item.has-submenu>a[aria-expanded="true"]+.category-submenu {
  /* No transform needed here either, just opacity/visibility */
}

.category-submenu>li>a {
  /* Styles for individual category links in header submenu (desktop) */
  display: block;
  padding: 8px 20px;
  /* Padding for individual links, with horizontal padding */
  text-decoration: none;
  color: var(--text);
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.category-submenu>li>a:hover,
.category-submenu>li>a:focus {
  color: var(--accent);
  background-color: var(--bg);
}

.menu-toggle {
  display: none;
  /* Hidden on desktop */
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 97;
  /* Ensure it's above the mobile menu and header */
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text);
  border-radius: 3px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) {
  top: 0;
}

.menu-toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle span:nth-child(3) {
  bottom: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  /* Push controls to the right */
  z-index: 55;
  /* Ensure it's above the header, but hidden if menu is open */
  flex-grow: 0;
  /* Default to 0 for desktop, will be overridden for mobile */
}

/* Search */
.search {
  flex-grow: 0;
  /* Default to 0 for desktop, will be overridden for mobile */
  max-width: 300px;
  /* Max width for search input on desktop */
  position: relative;
  /* Create stacking context for its z-index */
  z-index: 61;
  /* Higher than cart button to appear in front if overlapping */
}

.search input {
  width: 100%;
  /* Full width within its container */
  padding: 10px 14px;
  /* More padding */
  border: 1px solid #e6e7eb;
  border-radius: var(--radius);
  /* Use radius variable */
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease;
  /* Smooth transition */
  font-size: 15px;
  color: var(--text);
  /* Ensure text color is appropriate */
  background: var(--bg);
  /* Slightly different background for input */
}

.search input::placeholder {
  color: var(--muted);
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-focus-ring);
  /* Accent focus ring with new color */
}

/* Cart button */
.cart-btn {
  background: var(--surface);
  /* Use surface color */
  border: 1px solid #e6e7eb;
  padding: 9px 15px;
  /* More padding */
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: all .2s ease;
  box-shadow: var(--shadow);
  position: relative;
  /* Create stacking context */
  z-index: 61;
}

.cart-btn:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.cart-count {
  background: var(--accent);
  color: #fff;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  min-width: 28px;
  /* Ensure circular shape for single digits */
  text-align: center;
}

/* Main */
.main-content {
  padding-top: 0;
  /* Adjust main content padding to allow banner to use full width of container */
}




.hero-banner::before,
.hero-banner::after {
  content: none;
  /* Remove abstract shapes for a cleaner, more expensive look */
}

.banner-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-banner h2 {
  font-size: 2.8rem;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
  font-family: 'Jura', sans-serif;
  /* Apply Jura font to h2 */
}

.hero-banner p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  line-height: 1.5;
  opacity: 0.9;
  font-family: 'Jura', sans-serif;
  /* Apply Jura font to p */
}

.banner-btn {
  background: var(--surface);
  /* Use surface color for button */
  color: var(--accent);
  /* Text color from accent */
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.banner-btn:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.intro {
  padding: 25px 0;
  /* More vertical padding */
  color: var(--muted);
  font-size: 1.1rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 30px auto;
}

.page-content {
  padding-top: 40px;
  padding-bottom: 60px;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 2px;
}

.page-info-section {
  /* Generic style for content sections on static pages */
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 30px;
}

.page-info-section h3 {
  font-size: 1.8rem;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 25px;
  text-align: center;
}

.page-info-section h3 span {
  /* For highlights in titles */
  color: var(--text);
}

.page-info-section h4 {
  font-size: 1.25rem;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-info-section p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 15px;
}

.page-info-section p:last-of-type {
  margin-bottom: 0;
}

.page-info-section ul {
  list-style-type: disc;
  padding-left: 25px;
  margin-bottom: 15px;
  color: var(--muted);
}

.page-info-section li {
  margin-bottom: 8px;
}

.page-info-section li strong {
  color: var(--text);
  /* Make strong text stand out */
}

/* Specific adjustments for sub-sections */
.page-info-section h3+p {
  margin-top: 0;
}

/* 404 Page Specific Styles */
.not-found-page {
  text-align: center;
  padding-top: 60px;
  padding-bottom: 80px;
}

.not-found-section {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 600px;
  margin: 40px auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.not-found-section .icon {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 10px;
}

.not-found-section p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.not-found-section .btn {
  margin-top: 10px;
  font-size: 1.1rem;
  padding: 14px 30px;
}

/* New section for categories */
.categories-section {
  margin-bottom: 40px;
  padding: 20px 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.categories-section .section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
  /* To center the ::after pseudo-element below text */
  padding-bottom: 15px;
  /* Space for the underline */
}

.categories-section .section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent);
  border-radius: 2px;
}

.category-grid-wrapper {
  /* New wrapper to hold categories and 'show more' button */
  position: relative;
  padding-bottom: 50px;
  /* Space for the button */
}

.category-grid,
.hidden-categories {
  /* Default grid layout for larger screens */
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  /* 6 columns on desktop by default */
  gap: 20px;
  padding: 0 20px;
  max-width: 1000px;
  margin: 0 auto;
  justify-items: center;
  /* Center items horizontally within their grid cell */
  align-items: flex-start;
  /* Align items to the top of their grid cell */
}

.hidden-categories {
  overflow: hidden;
  /* Hide by default */
  max-height: 0;
  /* For CSS transition */
  transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
  opacity: 0;
  pointer-events: none;
  margin-top: 20px;
  /* Space between initial grid and hidden grid */
}

.hidden-categories.expanded {
  max-height: 2000px;
  /* A large enough value to show all categories */
  opacity: 1;
  pointer-events: auto;
}

.category-card {
  display: flex;
  /* Flexbox for internal layout of card */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Center content vertically and horizontally */
  width: 100%;
  /* Take full width of its grid cell */
  height: 160px;
  /* Fixed height for consistency */
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.category-card.active {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  background: var(--bg);
  /* Keep existing background, rely on border for active */
  transform: translateY(-1px);
}

.category-card img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 8px;
  border-radius: 0;
  /* No radius, assuming transparent icons */
  border: none;
  /* No border for the icon itself */
  box-shadow: none;
  /* No shadow for the icon itself */
  background: transparent;
  /* No background for the icon itself */
}

.category-card .category-name {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  display: -webkit-box;
  /* For multiline ellipsis */
  -webkit-line-clamp: 2;
  /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  /* Ensure it respects card width */
  white-space: normal;
  /* Allow text to wrap */
  text-align: center;
  /* Ensure text is centered */
}

/* Hidden categories container and toggle button */

.show-more-categories-btn {
  background: var(--bg);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-top: 30px;
  /* Space from categories above */
  position: absolute;
  /* Position relative to .category-grid-wrapper */
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: fit-content;
  min-width: 200px;
}

.show-more-categories-btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

/* Product grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  /* Larger cards */
  gap: 20px;
  /* More gap */
  padding-top: 20px;
}

/* Product card */
.card {
  background: var(--surface);
  /* Use surface color */
  border-radius: var(--radius);
  padding: 12px;
  /* Reverted to slightly less padding */
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Reverted to slightly less gap */
  transition: transform .2s ease, box-shadow .2s ease;
  /* Smooth transitions */
  overflow: hidden;
  /* Ensure image corners are rounded */
}

.card:hover {
  transform: translateY(-3px);
  /* Subtle lift on hover */
  box-shadow: var(--shadow-lg);
}

.card .card-link {
  /* Make the card clickable for product detail */
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  /* Allow link content to grow */
}

.card img {
  width: 100%;
  height: 140px;
  /* Reverted to slightly smaller height */
  object-fit: cover;
  border-radius: var(--radius);
  /* Reverted to full radius */
}

.card .title {
  font-weight: 600;
  font-size: 1rem;
  /* Reverted to slightly smaller title */
  color: var(--text);
}

.card .desc {
  font-size: 0.85rem;
  /* Reverted to slightly smaller description */
  color: var(--muted);
  min-height: 35px;
  /* Adjusted min-height */
  line-height: 1.4;
}

.card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  /* Push button to bottom */
  padding-top: 5px;
}

.card .product-price-on-card {
  /* New style for price on card */
  font-weight: 600;
  font-size: 1rem;
}

/* Quantity controls on product cards */
.qty-controls-on-card {
  display: flex;
  align-items: center;
  gap: 5px;
  /* Smaller gap for cards */
  flex-grow: 1;
  /* Allow it to take available space */
  justify-content: flex-end;
  /* Push to the right */
}

.qty-controls-on-card button {
  width: 36px;
  /* Adjusted to match primary button height for consistency */
  height: 36px;
  /* Adjusted to match primary button height for consistency */
  border-radius: var(--radius);
  border: 1px solid #e6e7eb;
  background: var(--surface);
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* Prevent buttons from shrinking */
}

.qty-controls-on-card button:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow);
}

.qty-controls-on-card .qty-display-card {
  min-width: 32px;
  /* Slightly wider for better text display */
  text-align: center;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text);
  flex-shrink: 0;
  line-height: 36px;
  /* Ensure vertical centering with new button height */
}

/* No specific .card .add-btn needed, as it uses .btn.btn-primary which now aligns well */

/* Product detail page specific styles */
.product-page-content {
  padding-top: 40px;
  /* Ensure space below header */
  padding-bottom: 60px;
}

.product-detail-container {
  display: flex;
  flex-wrap: wrap;
  /* Allow wrapping on smaller screens */
  gap: 40px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  align-items: flex-start;
  /* Align items to the top */
}

.product-image-area {
  flex: 1 1 400px;
  /* Grow/shrink, base width 400px */
  min-width: 300px;
  /* Minimum width for the image area */
  text-align: center;
}

.product-image-area img {
  max-width: 100%;
  height: auto;
  max-height: 450px;
  /* Limit height for very tall images */
  object-fit: contain;
  /* Ensure full image is visible */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-info-area {
  flex: 1 1 500px;
  /* Grow/shrink, base width 500px */
  min-width: 300px;
  /* Minimum width for info area */
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 5px;
  color: var(--text);
}

.product-description {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.product-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
}

/* New wrapper for product detail actions (add/quantity) */
.product-detail-action-area {
  display: flex;
  align-items: center;
  gap: 15px;
  /* Spacing between label and controls/button */
  margin-bottom: 20px;
  flex-wrap: wrap;
  /* Allow wrapping on small screens */
}

.product-detail-action-area .qty-label {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0;
  flex-shrink: 0;
}

/* New quantity controls for product detail page (when item is in cart) */
.product-detail-qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid #e6e7eb;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}

.product-detail-qty-controls .qty-btn {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: none;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  color: var(--text);
  flex-shrink: 0;
}

.product-detail-qty-controls .qty-btn:hover {
  background: var(--accent);
  color: #fff;
}

.product-detail-qty-controls .qty-display-detail {
  width: 60px;
  /* Wider for better text display */
  height: 40px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  flex-shrink: 0;
}

.add-to-cart-btn {
  /* This style applies when item is NOT in cart */
  width: fit-content;
  padding: 14px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 0;
}

.back-to-home-btn {
  width: fit-content;
  padding: 12px 25px;
  font-size: 1rem;
  /* Space from action area */
}

/* New section for related products */
.related-products-section {
  margin-top: 60px;
  /* Space between main product and related section */
}

.related-products-section .section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}

.related-products-section .section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent);
  border-radius: 2px;
}

/* Reusing .products-grid and .card styles for related products */
/* .products-grid { ... } */
/* .card { ... } */

/* Utility buttons */
.btn {
  padding: 10px 18px;
  /* More padding for buttons */
  border-radius: var(--radius);
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all .2s ease;
  white-space: nowrap;
  /* Prevent button text from wrapping */
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  /* Use darker accent on hover */
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border: 1px solid #e6e7eb;
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: color .2s ease;
}

.close-btn:hover {
  color: var(--text);
}

/* Add to cart success state */
.add-to-cart-btn.js-added {
  background: var(--success-color);
  color: #fff;
  pointer-events: none;
  /* Prevent re-clicking during animation */
  box-shadow: var(--shadow-lg);
  transform: scale(1.05);
}

/* Empty product grid state */
.empty-grid-message {
  grid-column: 1 / -1;
  /* Span full width */
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
  /* Ensure it takes full width of parent */
}

.empty-grid-message .icon {
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.7;
}

.empty-grid-message a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.empty-grid-message a:hover {
  text-decoration: underline;
}

/* 
/* Cart panel */
.cart-panel {
  position: fixed;
  right: 0;
  top: 0;
  width: 550px;
  height: 100%;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 95;
  transform-origin: top right;
  transition: transform .1s ease-out, opacity .1s ease-out, visibility .1s;
  transform: translateX(100%);
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.cart-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* No need for opacity and pointer-events as transform handles visibility */

.cart-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* Take full height of panel */
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  /* More padding */
  border-bottom: 1px solid #f0f0f0;
}

.cart-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  /* Scrollable content */
  padding: 15px;
  /* More padding */
  -webkit-overflow-scrolling: touch;
  /* Smooth scrolling on iOS */
}

.cart-item {
  display: flex;
  gap: 15px;
  /* More gap */
  align-items: center;
  padding: 10px;
  /* More padding */
  border-radius: var(--radius);
  background: var(--bg);
  /* Use bg color for items in cart */
  margin-bottom: 10px;
}

.cart-item img {
  width: 64px;
  /* Larger images */
  height: 64px;
  /* Larger images */
  object-fit: cover;
  border-radius: var(--radius);
}

.cart-item>div:first-of-type {
  /* Product details text */
  flex: 1;
}

.cart-item>div>div:first-child {
  font-weight: 600;
  font-size: 1rem;
}

.cart-item>div>div:last-child {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  /* More gap */
}

.qty-controls button {
  width: 32px;
  /* Larger buttons */
  height: 32px;
  /* Larger buttons */
  border-radius: var(--radius);
  border: 1px solid #e6e7eb;
  background: #fff;
  font-size: 1.1rem;
  color: var(--text);
  cursor: pointer;
  transition: all .2s ease;
}

.qty-controls button:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow);
}

.qty-controls .remove {
  background: transparent;
  border: 0;
  color: var(--danger);
  font-weight: 700;
  margin-left: 8px;
  font-size: 1.2rem;
}

.qty-controls .remove:hover {
  color: var(--danger);
  /* No direct darken in CSS, keep consistent */
  transform: translateY(-1px);
}

.cart-footer {
  padding: 15px 20px;
  /* More padding */
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  /* More gap */
  background: var(--surface);
  /* Use surface color */
}

.cart-footer .totals {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 500;
}

.cart-footer .totals strong {
  font-size: 1.3rem;
  color: var(--accent);
}

*/
/* Modal & backdrop */


.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 90;
}

.backdrop.show {
  opacity: 1;
  pointer-events: auto;
}


.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.95);
  /* Subtle scale effect */
  width: 580px;
  /* Wider modal */
  max-width: 94%;
  background: var(--surface);
  /* Use surface color */
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 95;
  /* Same as cart panel, above backdrop */
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  display: flex;
  /* Make it flex for mobile full height */
  flex-direction: column;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}


.modal-inner {
  padding: 20px;
  /* More padding */
  flex: 1;
  /* Allow content to grow */
  overflow-y: auto;
  /* Scrollable content on small screens */
  display: flex;
  flex-direction: column;
  max-height: 90dvh;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
  margin-bottom: 15px;
  /* More margin */
}

.modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--text);
}

/* Checkout Page Specific Styles (replacing modal styles) */
.checkout-page-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  /* Form takes more space than summary */
  gap: 30px;
  margin: 0 auto;
}

.checkout-form {
  /* Reusing .page-info-section for container styling */
  padding: 30px;
  margin-bottom: 0;
  /* No bottom margin, handled by grid gap */
  display: flex;
  flex-direction: column;
}

.checkout-form h3 {
  font-size: 1.8rem;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 25px;
  text-align: center;
}

.checkout-form .form-row {
  margin-bottom: 15px;
}

.checkout-form label {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 500;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid #e6e7eb;
  font-size: 1rem;
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease;
  color: var(--text);
  background: var(--bg);
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-focus-ring);
}

.checkout-form .form-actions {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  /* Space between buttons */
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.checkout-form .form-actions .btn {
  flex: 1;
  /* Make buttons take equal space */
  max-width: 50%;
  /* Max width for each button */
}

.order-summary-page {
  /* This is the right-hand summary on the checkout page */
  background: var(--surface);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0;
  /* No margin-bottom due to grid */
  display: flex;
  flex-direction: column;
}

.order-summary-page h3 {
  font-size: 1.8rem;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 25px;
  text-align: center;
}

.order-summary-page .order-summary-items {
  flex-grow: 1;
  min-height: 100px;
  /* Minimum height for scrollable area */
  max-height: 400px;
  /* Max height to enable scrolling if many items */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 10px;
  /* Space for scrollbar */
  margin-bottom: 15px;
  /* Space before total */
}

.order-summary-page .summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--muted);
  border-bottom: 1px dashed #eee;
}

.order-summary-page .summary-item:last-of-type {
  border-bottom: none;
}

.order-summary-page .summary-item-name {
  flex: 1;
  padding-right: 10px;
}

.order-summary-page .summary-item-price {
  font-weight: 600;
  color: var(--text);
}

.order-summary-page .empty-summary-message {
  text-align: center;
  color: var(--muted);
  padding: 20px 0;
}

.order-summary-page .summary-total {
  margin-top: 15px;
  text-align: right;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text);
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.order-summary-page .summary-total strong {
  color: var(--accent);
  font-size: 1.5rem;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--accent);
  /* Changed to accent color for better visual alignment */
  color: #fff;
  /* Ensure text remains white for contrast */
  padding: 12px 18px;
  /* More padding */
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  /* Larger initial translation */
  transition: opacity .25s ease, transform .25s ease;
  /* Smoother transition */
  z-index: 1000;
  /* Highest z-index for toast */
  font-size: 0.95rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  background: var(--surface);
  /* Changed from dark to surface color */
  color: var(--text);
  /* Adjusted text color for light background */
  padding: 40px 20px;
  margin-top: 60px;
  font-size: 0.9rem;
  line-height: 1.6;
  box-shadow: var(--shadow);
  /* Add a subtle shadow */
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.footer-section h4 {
  color: var(--accent);
  /* Changed from white to accent color */
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-section p,
.footer-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid #e6e7eb;
  /* Lighter border for light footer */
  padding-top: 20px;
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
}

/* Scroll to Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--accent);
  /* Use new accent color */
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 50;
  opacity: 0;
  transform: translateY(10px);
}

.scroll-to-top-btn.show {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top-btn:hover {
  background: var(--accent-hover);
  /* Darker accent on hover */
  transform: translateY(-2px);
}

/* New styles for the About Us page */
.about-section {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 30px;
}

.about-section h3 {
  font-size: 1.8rem;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 25px;
  text-align: center;
}

.about-section h4 {
  font-size: 1.25rem;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 600;
}

.about-section p,
.about-section ul {
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 15px;
}

.about-section ul {
  list-style-type: disc;
  padding-left: 25px;
}

.about-section li {
  margin-bottom: 8px;
}

.about-content-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  /* Center content like images */
  text-align: center;
  /* Center text within the block */
}

.about-content-block p,
.about-content-block ul {
  max-width: 700px;
  /* Constrain text width for readability */
  text-align: left;
  /* Align text left within its constrained block */
  margin: 0 auto;
}

.about-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 15px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.value-item {
  text-align: center;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.value-item h4 {
  color: var(--accent);
  margin-bottom: 10px;
}

.future-plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* Default to single column */
  gap: 30px;
  margin-top: 30px;
}

.plan-item {
  text-align: center;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.plan-item h4 {
  color: var(--text);
  margin-bottom: 10px;
}

.plan-item p {
  text-align: center;
  margin: 0;
  flex-grow: 1;
  /* Allow text to grow */
}

.plan-image {
  max-width: 100%;
  height: 200px;
  /* Consistent height for plan images */
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 20px;
}

/* Order Success Page */
.order-success-section {
  text-align: center;
  /* Center content */
  padding: 40px;
  /* More padding */
  max-width: 700px;
  margin: 40px auto;
  /* Center the section on the page */
}

.order-success-section .success-icon {
  font-size: 5rem;
  /* Large icon */
  margin-bottom: 20px;
  line-height: 1;
  animation: pulse 1.5s infinite ease-in-out;
  /* Subtle animation */
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.order-success-section h3 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 20px;
}

.order-success-section p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 15px;
}

.order-id-display {
  display: inline-block;
  /* Allow padding and margin */
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
  /* Reduced font size */
  padding: 8px 15px;
  /* Reduced padding */
  border-radius: var(--radius);
  margin: 10px 0;
  /* Space it out */
  letter-spacing: 1px;
  /* A bit of spacing for readability */
  box-shadow: var(--shadow);
}

.order-highlight-name,
.order-highlight-phone,
.order-total-display {
  font-weight: 600;
  color: var(--accent);
  /* Highlight with accent color */
  font-size: 1.2rem;
  /* Slightly larger for emphasis */
}

.order-total-display {
  display: inline-block;
  /* To allow padding/margin if needed */
  margin-top: 5px;
  /* Separate from previous text slightly */
  font-size: 1.8rem;
  /* Even larger for total */
}

/* New rule for the button in order-success page */
.order-success-section .btn-primary {
  margin-top: 30px;
  /* Increased margin to move button lower */
}

/* Order Failure Page */
.order-failure-section {
  text-align: center;
  padding: 40px;
  max-width: 700px;
  margin: 40px auto;
  background: var(--surface);
  /* Add background for a card-like appearance */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  /* Use flexbox for better alignment of content */
  flex-direction: column;
  align-items: center;
  /* Center items horizontally */
  gap: 15px;
  /* Spacing between elements */
}

.order-failure-section .failure-icon {
  font-size: 5rem;
  margin-bottom: 10px;
  /* Reduced margin, relying on gap */
  line-height: 1;
  color: var(--danger);
  /* Use danger color for the failure icon */
  animation: shake 0.8s cubic-bezier(.36, .07, .19, .97) both;
  /* Subtle shake animation */
  transform-origin: center center;
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

.order-failure-section h3 {
  font-size: 2rem;
  color: var(--text);
  margin: 0;
  /* Rely on gap for spacing */
}

.order-failure-section p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
  /* Rely on gap for spacing */
  max-width: 500px;
  /* Limit width for readability */
}

.order-highlight-email,
.order-highlight-phone {
  font-weight: 700;
  /* Bolder font weight */
  color: var(--danger);
  /* Highlight contact info with danger color */
  font-size: 1.3rem;
  /* Larger font size for emphasis */
  background-color: var(--bg);
  /* Slight background for highlight */
  padding: 5px 10px;
  border-radius: var(--radius);
  display: inline-block;
  /* Allow padding */
  margin-top: 5px;
  /* Separate from previous text */
}

/* New styles for the Maintenance page */
.maintenance-section {
  text-align: center;
  padding: 40px;
  max-width: 700px;
  margin: 40px auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.maintenance-section .maintenance-icon {
  font-size: 5rem;
  margin-bottom: 10px;
  line-height: 1;
  animation: float 2s ease-in-out infinite;
  /* Subtle floating animation */
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.maintenance-section h3 {
  font-size: 2rem;
  color: var(--text);
  margin: 0;
}

.maintenance-section h4 {
  font-size: 1.25rem;
  color: var(--accent);
  margin-top: 15px;
  /* Add some space above contacts title */
  margin-bottom: 5px;
  font-weight: 600;
}

.maintenance-section p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
  max-width: 500px;
}

.maintenance-section .contact-highlight {
  font-weight: 700;
  color: var(--accent);
  /* Highlight contacts with accent color */
  font-size: 1.3rem;
  background-color: var(--bg);
  padding: 5px 10px;
  border-radius: var(--radius);
  display: inline-block;
  margin-top: 5px;
}

/* Responsive adjustments for new pages and mobile menu */
@media (max-width: 900px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    /* Logo | Search & Cart Controls | Menu Toggle */
    grid-template-rows: auto;
    align-items: center;
    gap: 10px 15px;
    /* Row gap, column gap */
    min-height: var(--header-height);
  }

  .brand {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .menu-toggle {
    display: block;
    /* Show hamburger menu */
    grid-column: 3 / 4;
    /* Position menu toggle as the third element */
    grid-row: 1 / 2;
  }

  .main-nav {
    /* Mobile menu styles */
    position: fixed;
    /* Overlay the entire viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Full height */
    z-index: 96;
    /* Below toggle/controls, above main content */
    padding-top: var(--header-height);
    /* Offset for fixed header */
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    /* Add shadow to overlay */
    overflow-y: auto;
    /* Initial state for hiding */
    transform: translateX(100%);
    /* Slide in from right */
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0.3s;
    margin-left: 0;
    /* Reset desktop margin */
  }

  .main-nav.active {
    transform: translateX(0%);
    /* Slide to visible */
    opacity: 1;
    visibility: visible;
  }

  .main-menu {
    flex-direction: column;
    width: 100%;
    padding: 20px 0;
    /* More padding for mobile items */
    gap: 0;
  }

  .main-menu>li>a {
    /* Apply to top-level menu items */
    padding: 15px 20px;
    /* Larger tap targets */
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Separator for top-level links */
  }

  .main-menu>li:last-child>a {
    border-bottom: none;
  }

  .menu-item.has-submenu>a::after {
    float: right;
    margin-right: 10px;
    transform: rotate(0deg);
    /* Reset rotation for mobile */
  }

  .menu-item.has-submenu.submenu-open>a::after {
    transform: rotate(180deg);
  }

  .submenu {
    position: static;
    /* No absolute positioning on mobile */
    opacity: 1;
    /* Always visible if parent is active */
    visibility: visible;
    box-shadow: none;
    border-radius: 0;
    background: var(--bg);
    /* Slightly different background for submenu items */
    padding: 0;
    /* Adjust padding for mobile submenu */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
  }

  .menu-item.submenu-open .submenu {
    max-height: 500px;
    /* Increased for more content safety */
  }

  .submenu li a {
    /* Apply to all links directly inside any submenu on mobile */
    display: block;
    padding: 15px 20px 15px 40px;
    /* Indent and give ample padding */
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Separator */
  }

  .submenu li:last-child a {
    border-bottom: none;
  }

  /* Mobile specific styles for category submenu: stack them naturally */
  .category-submenu {
    display: block;
    /* Change from grid to block for stacking */
    min-width: unset;
    max-width: 100%;
    padding: 0;
    /* Ensure no extra padding around the links */
    left: 0;
    transform: translateX(0) translateY(0);
    /* Remove centering transform */
  }

  .menu-item.submenu-open .submenu {
    max-height: 800px;
    /* Allow enough height for all categories, and other submenus */
  }

  /* The .category-submenu .submenu-item desktop-only styling is implicitly handled by not being in this media query. */
  /* Mobile styling for category links is now covered by the generic .submenu a rule. */

  .controls {
    grid-column: 2 / 3;
    /* Move controls to the second column, which is 1fr */
    grid-row: 1 / 2;
    display: flex;
    /* Ensure it's a flex container for search and cart */
    align-items: center;
    gap: 8px;
    /* Gap between search and cart button */
    flex-grow: 1;
    /* Allow controls to take available space in the grid column */
    justify-content: flex-end;
    /* Align contents to the right */
    transition: opacity 0.3s ease, visibility 0.3s;
  }

  body.menu-open .controls {
    /* Hide controls when menu is open on mobile */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .search {
    flex-grow: 1;
    /* Allow search to take most available space within .controls */
    max-width: none;
    /* Remove restrictive max-width from desktop styles */
    width: auto;
    /* Allow width to be determined by flex-grow */
  }

  .search input {
    width: 100%;
    /* Input should still take 100% of its parent (.search) */
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .cart-btn {
    flex-shrink: 0;
    /* Prevent cart button from shrinking */
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .page-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }

  .page-info-section h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  .page-info-section h4 {
    font-size: 1.15rem;
  }

  /* Product detail page adjustments */
  .product-page-content {
    padding-left: 0;
    /* Use full width for product detail */
    padding-right: 0;
  }

  .product-detail-container {
    flex-direction: column;
    /* Stack image and info */
    gap: 20px;
    /* Reduced gap for smaller screens */
    padding: 20px;
    /* Adjusted padding */
  }

  .product-image-area {
    min-width: unset;
    /* Remove min-width */
    width: 100%;
  }

  .product-info-area {
    min-width: unset;
    /* Remove min-width */
    width: 100%;
  }

  .product-title {
    font-size: 1.8rem;
  }

  .product-description {
    font-size: 1rem;
  }

  .product-price {
    font-size: 2rem;
  }

  .product-detail-action-area {
    flex-direction: row;
    /* Keep elements in a row if possible */
    align-items: center;
    gap: 10px;
    /* Reduced gap */
    justify-content: center;
    /* Center action items */
  }

  .product-detail-action-area .qty-label {
    margin-bottom: 0;
  }

  .add-to-cart-btn {
    padding: 12px 25px;
    /* Adjust button size */
    font-size: 1rem;
  }

  .product-detail-qty-controls .qty-btn {
    width: 36px;
    /* Slightly smaller buttons */
    height: 36px;
    font-size: 1.1rem;
  }

  .product-detail-qty-controls .qty-display-detail {
    width: 50px;
    /* Slightly narrower display */
    height: 36px;
    font-size: 1rem;
    line-height: 36px;
    /* Ensure vertical centering */
  }

  .back-to-home-btn {
    /* Adjust margin */
    align-self: center;
    /* Center the button */
  }

  .related-products-section .section-title {
    font-size: 1.6rem;
    /* Adjust related section title */
  }
}

@media (max-width: 768px) {
  .future-plans-grid {
    grid-template-columns: 1fr;
    /* Single column on larger mobile screens */
  }

  /* Categories Grid for tablets */
  .category-grid,
  .hidden-categories {
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on tablets */
    gap: 15px;
    /* Slightly smaller gap */
  }

  .category-card {
    height: 150px;
    /* Adjust height for 3 columns */
  }
}

@media (max-width: 640px) {
  .container {
    padding: 15px;
  }

  .header-inner {
    /* These properties are now covered by the 900px breakpoint for grid layout */
    gap: 10px;
  }

  .brand-logo {
    height: 50px;
    /* Slightly smaller logo on mobile */
    max-width: 120px;
  }

  .main-content {
    padding-top: 0;
  }

  .hero-banner {
    padding: 40px 15px;
    margin-bottom: 30px;
    border-radius: 0;
    /* Full width banner on mobile */
  }

  .hero-banner h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .hero-banner p {
    font-size: 1.05rem;
    margin-bottom: 20px;
  }

  .banner-btn {
    font-size: 1rem;
    padding: 12px 25px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    /* Smaller cards on mobile */
    gap: 12px;
  }

  .card {
    padding: 8px;
    /* Further reduced padding for cards */
    gap: 6px;
    /* Further reduced gap for cards */
  }

  .card img {
    height: 100px;
    /* Smaller images on mobile */
  }

  .card .title {
    font-size: 0.95rem;
    /* Slightly smaller title */
  }

  .card .desc {
    font-size: 0.75rem;
    /* Smaller description */
    min-height: 28px;
    /* Tighter min-height */
  }

  .card .row>div {
    font-size: 0.9rem;
    /* Smaller price text */
  }

  .product-price-on-card {
    font-size: 0.9rem;
    /* Match other row content */
  }

  .qty-controls-on-card button {
    width: 30px;
    /* Smaller quantity buttons */
    height: 30px;
    font-size: 0.9rem;
  }

  .qty-controls-on-card .qty-display-card {
    min-width: 28px;
    /* Smaller quantity display */
    line-height: 30px;
    font-size: 0.9rem;
  }

  .btn {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  /* Product Detail Page specific adjustments for very small screens */
  .product-page-content {
    padding-left: 0;
    /* Use full width for product detail */
    padding-right: 0;
  }

  .product-detail-container {
    padding: 15px 10px;
    /* Reduced horizontal padding */
    gap: 15px;
    /* Slightly reduced vertical gap */
  }

  .product-title {
    font-size: 1.6rem;
    /* Smaller title */
  }

  .product-description {
    font-size: 0.95rem;
    /* Smaller description */
  }

  .product-price {
    font-size: 1.8rem;
    /* Smaller price */
  }

  .product-detail-action-area {
    gap: 8px;
    /* Reduced gap in action area */
  }

  .product-detail-qty-controls .qty-btn {
    width: 32px;
    /* Slightly smaller buttons */
    height: 32px;
    font-size: 1.1rem;
  }

  .product-detail-qty-controls .qty-display-detail {
    width: 45px;
    /* Slightly narrower display */
    height: 32px;
    font-size: 0.95rem;
    /* Smaller font for quantity */
    line-height: 32px;
  }

  .add-to-cart-btn {
    padding: 10px 20px;
    /* Slightly smaller add to cart button */
    font-size: 0.95rem;
  }

  .back-to-home-btn {
    padding: 10px 20px;
    /* Consistent button size */
    font-size: 0.95rem;
  }

  /* Categories Grid for very small screens */
  .category-grid,
  .hidden-categories {
    display: flex;
    /* Use flex for more fluid 2-column wrap */
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 0 10px;
    /* Reduce padding */
  }

  .category-card {
    flex-basis: calc(50% - 6px);
    /* Two columns, with 12px gap (12px / 2 = 6px on each side) */
    max-width: calc(50% - 6px);
    width: auto;
    /* Allow flex-basis to control */
    height: 130px;
    /* Further reduce height */
  }

  .category-card img {
    width: 55px;
    /* Slightly smaller icon on very small mobile */
    height: 55px;
  }

  .category-card .category-name {
    font-size: 0.8rem;
    /* Smaller font size */
  }

  /* Cart panel full screen on mobile */
  .cart-panel {
    width: 100%;
    right: 0;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 0;
    /* No border-radius for full screen */
  }

  /* Modal full screen on mobile */
  .modal {
    width: 100%;
    height: 100%;
    max-width: 100%;
    border-radius: 0;
    transform: translate(-50%, -50%) scale(1);
    /* No scale for full screen */
    top: 0;
    left: 0;
  }

  .modal[aria-hidden="false"] {
    transform: translate(0, 0);
    /* Center without scale */
  }

  .modal-inner {
    padding: 15px;
  }

  .modal-header {
    padding-bottom: 8px;
    margin-bottom: 12px;
  }

  .modal-header h3 {
    font-size: 1.2rem;
  }

  .form-actions {
    /* flex-direction: column-reverse;  */
    align-items: stretch;
  }

  .form-actions .btn {
    width: 100%;
    /* Full width buttons */
  }

  .toast {
    left: 50%;
    /* Center toast horizontally */
    transform: translateX(-50%) translateY(10px);
    right: auto;
    bottom: 15px;
    /* Slightly higher */
    width: calc(100% - 30px);
    /* Full width with padding */
    text-align: center;
  }

  .toast.show {
    transform: translateX(-50%) translateY(0);
  }

  .footer-inner {
    flex-direction: column;
    /* Stack footer sections */
    align-items: center;
    text-align: center;
  }

  .footer-section {
    max-width: none;
    width: 100%;
  }

  .scroll-to-top-btn {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}





@media (max-width: 768px) {
  .checkout-page-grid {
    grid-template-columns: 1fr;
    /* один столбец на мобилках */
  }
}



    .delivery-method-selection {
      margin-bottom: 25px;
      padding-top: 10px;
    }

    .delivery-method-selection .delivery-method-label {
      font-size: 1rem;
      color: var(--text);
      margin-bottom: 15px;
      font-weight: 600;
      display: block;
    }

    .delivery-options-group {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 15px;
    }

    .delivery-checkout-card-label {
      display: flex;
      flex-direction: column;
      background: var(--bg);
      border: 2px solid #e6e7eb;
      border-radius: var(--radius);
      padding: 15px;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
      min-height: 150px;
      justify-content: flex-start;
    }

    .delivery-checkout-card-label:hover {
      border-color: var(--accent-hover);
      box-shadow: var(--shadow);
    }

    .delivery-checkout-card-label input[type="radio"] {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
      pointer-events: none;
    }

    .delivery-checkout-card-label:has(input[type="radio"]:checked) {
      border-color: var(--accent);
      background: var(--surface);
      box-shadow: 0 0 0 3px var(--accent-focus-ring);
      transform: translateY(-1px);
    }

    .delivery-checkout-card-label:focus-within {
      outline: none;
      box-shadow: 0 0 0 3px var(--accent-focus-ring);
    }

    .delivery-card-content {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      text-align: left;
    }

    .delivery-card-content h4 {
      font-size: 1.2rem;
      color: var(--accent);
      margin-top: 0;
      margin-bottom: 15px;
      text-align: center;
      position: relative;
      padding-bottom: 10px;
      font-weight: 600;
    }

    .delivery-card-content h4::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 30px;
      height: 2px;
      background-color: var(--accent);
      border-radius: 1px;
    }

    .delivery-card-content ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .delivery-card-content li {
      margin-bottom: 8px;
      font-size: 0.95rem;
      color: var(--text);
      display: flex;
      justify-content: space-between;
      align-items: baseline;
    }

    .delivery-card-content li strong {
      color: var(--muted);
      font-weight: 400;
      margin-right: 5px;
      flex-shrink: 0;
    }
    .delivery-card-content li span {
      font-weight: 600;
      color: var(--text);
      text-align: right;
      flex-grow: 1;
    }

    /* NEW styles for the final total display within the form */
    .checkout-final-total {
      margin-top: 30px;
      text-align: right;
      font-weight: 600;
      font-size: 1.3rem;
      color: var(--text);
      padding-top: 20px;
      border-top: 1px solid #f0f0f0;
      margin-bottom: 25px; /* Space before form actions */
    }

    .checkout-final-total strong {
      color: var(--accent);
      font-size: 1.5rem;
    }

    /* NEW styles for form-grid */
    .form-grid {
      display: grid;
      grid-template-columns: 1fr; /* Default to single column on mobile */
      gap: 15px 25px; /* Row gap, Column gap */
      margin-bottom: 10px; /* Space before delivery method */
    }

    @media (min-width: 768px) {
      .form-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns on larger screens */
      }
    }

