/* ================================================================
   MODOPENCART THEME - точная копия React мокапа
   ================================================================ */

/* Reset & Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #2d3748;
  line-height: 1.5;
}

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

/* Container */
.moc-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ================================================================
   TOP BAR - темная полоса
   ================================================================ */
.moc-topbar {
  background: #1a202c;
  color: #a0aec0;
  font-size: 0.8rem;
  padding: 0.5rem 0;
}

.moc-topbar .moc-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ================================================================
   HEADER - синий градиент
   ================================================================ */
.moc-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.moc-header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Search wrapper - растягивается и толкает корзину вправо */
.moc-search-wrapper {
  flex: 1;
  max-width: 500px;
}

/* Cart wrapper - прижат к правому краю */
.moc-cart-wrapper {
  margin-left: auto;
}

/* Logo */
.moc-logo {
  background: #4299e1;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1.25rem;
  white-space: nowrap;
}

.moc-logo img {
  height: 40px;
  display: block;
}

/* ================================================================
   MEGA MENU BUTTON - зеленая кнопка
   ================================================================ */
.moc-menu-wrapper {
  position: relative;
}

.moc-menu-btn {
  background: #48bb78;
  border: none;
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.moc-menu-btn:hover {
  background: #38a169;
}

.moc-chevron {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.moc-chevron.open {
  transform: rotate(180deg);
}

/* Dropdown */
.moc-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  min-width: 320px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.moc-menu-dropdown.open {
  display: block;
}

.moc-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  color: #4a5568;
  border-bottom: 1px solid #edf2f7;
  transition: all 0.15s;
}

.moc-menu-item:hover {
  background: #ebf8ff;
  color: #2b6cb0;
}

.moc-menu-item i {
  width: 20px;
  text-align: center;
  color: #4299e1;
}

.moc-menu-name {
  flex: 1;
  font-size: 0.875rem;
}

.moc-menu-count {
  background: #edf2f7;
  color: #718096;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

/* Menu loading & empty states */
.moc-menu-loading,
.moc-menu-empty {
  padding: 1.5rem;
  text-align: center;
  color: #718096;
  font-size: 0.9rem;
}

.moc-menu-loading i {
  margin-right: 0.5rem;
}

/* ================================================================
   SEARCH - поле поиска в хедере
   ================================================================ */
.moc-search-wrapper {
  flex: 1;
  max-width: 400px;
}

.moc-search-wrapper #search,
.moc-search-wrapper .input-group {
  display: flex;
  width: 100%;
}

.moc-search-wrapper input[type="text"],
.moc-search-wrapper .form-control {
  flex: 1;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px 0 0 4px;
  font-size: 0.9rem;
  outline: none;
}

.moc-search-wrapper button {
  background: #48bb78;
  border: none;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.moc-search-wrapper button:hover {
  background: #38a169;
}

/* ================================================================
   CART - корзина в хедере
   ================================================================ */
.moc-cart-wrapper #cart,
.moc-cart-wrapper .btn-group {
  position: relative;
}

.moc-cart-wrapper #cart > button,
.moc-cart-wrapper .btn-group > button {
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.moc-cart-wrapper #cart > button:hover,
.moc-cart-wrapper .btn-group > button:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

/* DROPDOWN корзины - скрыт по умолчанию! */
.moc-cart-wrapper .dropdown-menu,
.moc-cart-wrapper #cart > ul,
#cart > ul,
#cart .dropdown-menu {
  display: none !important;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 320px;
  padding: 1rem;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  background: white;
  color: #2d3748;
  z-index: 1000;
  margin-top: 5px;
}

/* Показываем при открытии */
.moc-cart-wrapper .btn-group.open .dropdown-menu,
.moc-cart-wrapper #cart.open > ul,
.moc-cart-wrapper .dropdown-menu.show,
#cart.open > ul,
#cart .dropdown-menu.open,
.btn-group.open > .dropdown-menu {
  display: block !important;
}

/* Стили содержимого корзины */
.moc-cart-wrapper .dropdown-menu li {
  list-style: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.moc-cart-wrapper .dropdown-menu li:last-child {
  border-bottom: none;
}

.moc-cart-wrapper .dropdown-menu table {
  width: 100%;
}

.moc-cart-wrapper .dropdown-menu td {
  padding: 0.5rem;
  vertical-align: top;
}

.moc-cart-wrapper .dropdown-menu .text-right {
  text-align: right;
}

.moc-cart-wrapper .dropdown-menu .btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  margin: 0.25rem;
}

.moc-cart-wrapper .dropdown-menu .btn-primary {
  background: #4299e1;
  color: white;
}

.moc-cart-wrapper .dropdown-menu .btn-danger {
  background: #e53e3e;
  color: white;
}

/* ================================================================
   NAVIGATION - под хедером
   ================================================================ */
.moc-nav {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 0;
}

.moc-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

.moc-nav-list a {
  color: #4a5568;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.moc-nav-list a:hover {
  color: #2b6cb0;
}

/* ================================================================
   MAIN LAYOUT
   ================================================================ */
.moc-main {
  padding: 1.5rem 0;
}

.moc-layout {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-start;
  gap: 24px !important;
}

/* Fallback для gap - отступы между элементами */
.moc-layout > *:not(:last-child) {
  margin-right: 24px;
}

/* Сайдбар */
.moc-layout > .moc-sidebar,
.moc-layout > aside,
.moc-layout > #column-left {
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  flex-shrink: 0 !important;
}

/* Контент */
.moc-layout > .moc-content,
.moc-layout > main,
.moc-layout > #content {
  flex: 1 !important;
  min-width: 0 !important;
}

/* Правый сайдбар */
.moc-layout > #column-right {
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  flex-shrink: 0 !important;
}

/* Главная страница - полная ширина без сайдбара */
.moc-home-content {
  width: 100%;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.moc-sidebar {
  width: 280px;
  flex-shrink: 0;
}

/* Promo Banner */
.moc-promo {
  background: linear-gradient(135deg, #48bb78 0%, #2f855a 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1rem;
}

.moc-promo-discount {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.moc-promo-text {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

/* Categories in sidebar */
.moc-categories-list {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.moc-cat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #4a5568;
  border-bottom: 1px solid #edf2f7;
  transition: all 0.15s;
}

.moc-cat-item:last-child {
  border-bottom: none;
}

.moc-cat-item:hover {
  background: #ebf8ff;
  color: #2b6cb0;
}

.moc-cat-item.active {
  background: #ebf8ff;
  color: #2b6cb0;
  font-weight: 500;
}

.moc-cat-item i {
  color: #4299e1;
  width: 18px;
  text-align: center;
}

.moc-cat-name {
  flex: 1;
  font-size: 0.875rem;
}

.moc-cat-count {
  background: #edf2f7;
  color: #718096;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

/* ================================================================
   CONTENT AREA
   ================================================================ */
.moc-content {
  flex: 1;
  min-width: 0;
}

.moc-content-full {
  max-width: 100%;
}

/* Breadcrumb */
.moc-breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.moc-breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: #a0aec0;
}

.moc-breadcrumb a {
  color: #718096;
}

.moc-breadcrumb a:hover {
  color: #2b6cb0;
}

/* Content Header */
.moc-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.moc-content-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a202c;
}

/* Toolbar */
.moc-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.moc-toolbar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.moc-toolbar-item label {
  color: #718096;
  font-size: 0.85rem;
}

.moc-toolbar-item select {
  padding: 0.4rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
}

/* ================================================================
   PRODUCT CARDS - главное!
   ================================================================ */
.moc-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.moc-product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.moc-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* Product Image */
.moc-product-image {
  position: relative;
  background: #f7fafc;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.moc-product-image img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
}

/* Version Badges */
.moc-product-versions {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  gap: 0.25rem;
}

.moc-version {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  color: white;
}

.moc-version.v3 {
  background: #48bb78;
}

.moc-version.v2 {
  background: #ed8936;
}

/* Sale Badge */
.moc-sale-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #e53e3e;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Product Info */
.moc-product-info {
  padding: 1rem;
}

.moc-product-name {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.moc-product-name a {
  color: #2d3748;
}

.moc-product-name a:hover {
  color: #2b6cb0;
}

/* Rating */
.moc-product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.moc-stars {
  color: #f6ad55;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.moc-reviews {
  color: #a0aec0;
  font-size: 0.8rem;
}

/* Price */
.moc-product-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.moc-price-current {
  font-size: 1.1rem;
  font-weight: bold;
  color: #2b6cb0;
}

.moc-price-old {
  font-size: 0.85rem;
  color: #a0aec0;
  text-decoration: line-through;
}

/* Buttons */
.moc-product-buttons {
  display: flex;
  gap: 0.5rem;
}

.moc-btn-cart {
  flex: 1;
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: opacity 0.2s;
}

.moc-btn-cart:hover {
  opacity: 0.9;
}

.moc-btn-quick {
  background: #edf2f7;
  border: none;
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  color: #4a5568;
  transition: all 0.2s;
}

.moc-btn-quick:hover {
  background: #e2e8f0;
  color: #2b6cb0;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.moc-pagination-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.moc-results {
  color: #718096;
  font-size: 0.85rem;
}

.moc-pagination .pagination {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.moc-pagination .pagination li a,
.moc-pagination .pagination li span {
  display: block;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #4a5568;
  font-size: 0.85rem;
  background: white;
}

.moc-pagination .pagination li.active span {
  background: #4299e1;
  border-color: #4299e1;
  color: white;
}

.moc-pagination .pagination li a:hover {
  background: #ebf8ff;
  border-color: #4299e1;
  color: #2b6cb0;
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.moc-empty {
  text-align: center;
  padding: 3rem;
  background: white;
  border-radius: 8px;
}

.moc-empty p {
  color: #718096;
  margin-bottom: 1rem;
}

.moc-btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
}

/* ================================================================
   FOOTER
   ================================================================ */
.moc-footer {
  background: #1e3a5f;
  color: white;
  padding: 2rem 0 0;
  margin-top: 2rem;
}

.moc-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
}

.moc-footer-logo {
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.moc-footer-desc {
  opacity: 0.7;
  font-size: 0.875rem;
}

.moc-footer-col h5 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.moc-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.moc-footer-col ul li {
  margin-bottom: 0.5rem;
}

.moc-footer-col ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.moc-footer-col ul li a:hover {
  color: white;
}

.moc-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding: 1rem 0;
  text-align: center;
  opacity: 0.7;
  font-size: 0.85rem;
}

/* ================================================================
   MODULE TITLE
   ================================================================ */
.moc-module-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: #1a202c;
}

/* ================================================================
   SUBCATEGORIES
   ================================================================ */
.moc-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.moc-subcat-link {
  padding: 0.4rem 0.75rem;
  background: white;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #4a5568;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.2s;
}

.moc-subcat-link:hover {
  background: #ebf8ff;
  color: #2b6cb0;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .moc-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .moc-container {
    padding: 0 1rem;
  }
  
  .moc-header-inner {
    flex-wrap: wrap;
  }
  
  .moc-search-wrapper {
    order: 10;
    max-width: 100%;
    flex-basis: 100%;
    margin-top: 1rem;
  }
  
  .moc-layout {
    flex-direction: column;
    gap: 16px !important;
  }
  
  .moc-layout > *:not(:last-child) {
    margin-right: 0 !important;
    margin-bottom: 16px;
  }
  
  /* Сброс margins на мобильных */
  .moc-sidebar + #content,
  .moc-sidebar + .moc-content,
  #column-left + #content,
  aside + #content,
  #content + #column-right,
  #content + .moc-sidebar,
  .moc-content + #column-right {
    margin-left: 0 !important;
  }
  
  #column-left,
  .moc-sidebar {
    margin-right: 0 !important;
  }
  
  #column-right {
    margin-left: 0 !important;
  }
  
  .moc-layout > .moc-sidebar,
  .moc-layout > aside,
  .moc-layout > #column-left,
  .moc-layout > #column-right {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }
  
  .moc-sidebar {
    width: 100%;
  }
  
  .moc-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .moc-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .moc-menu-btn span {
    display: none;
  }
  
  .moc-products-grid {
    grid-template-columns: 1fr;
  }
  
  .moc-content-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ================================================================
   PRODUCT PAGE STYLES
   ================================================================ */
.moc-product-page {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2rem;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.moc-product-main-image {
  display: block;
  background: #f7fafc;
  padding: 1rem;
  border-radius: 8px;
}

.moc-product-main-image img {
  width: 100%;
  height: auto;
}

.moc-product-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.moc-product-thumbs a {
  display: block;
  width: 80px;
  background: #f7fafc;
  padding: 0.5rem;
  border-radius: 4px;
}

.moc-product-thumbs img {
  width: 100%;
}

.moc-product-details h1 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

.moc-product-meta {
  margin-bottom: 1rem;
}

.moc-meta-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.9rem;
}

.moc-meta-item span {
  color: #718096;
}

.moc-product-price-block {
  background: #f7fafc;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.moc-price-big {
  font-size: 2rem;
  font-weight: bold;
  color: #2b6cb0;
}

.moc-price-old-big {
  font-size: 1.25rem;
  color: #a0aec0;
  text-decoration: line-through;
  margin-left: 0.5rem;
}

.moc-tax {
  font-size: 0.85rem;
  color: #718096;
  margin-top: 0.5rem;
}

.moc-options {
  margin: 1rem 0;
}

.moc-option {
  margin-bottom: 1rem;
}

.moc-option label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.moc-option.required label::after {
  content: '*';
  color: #e53e3e;
  margin-left: 0.25rem;
}

.moc-select, .moc-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.9rem;
}

.moc-add-cart {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin: 1.5rem 0;
}

.moc-qty label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.moc-input-qty {
  width: 80px;
  text-align: center;
  padding: 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
}

.moc-btn-cart-big {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.moc-btn-cart-big:hover {
  opacity: 0.9;
}

.moc-product-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.moc-product-actions button {
  background: #edf2f7;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: #4a5568;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.moc-product-actions button:hover {
  background: #e2e8f0;
}

/* Tabs */
.moc-tabs {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.moc-tabs-nav {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
}

.moc-tabs-nav button {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: #718096;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.moc-tabs-nav button.active {
  color: #2b6cb0;
  border-bottom-color: #4299e1;
}

.moc-tab-content {
  padding: 1.5rem;
  display: none;
}

.moc-tab-content.active {
  display: block;
}

.moc-specs-table {
  width: 100%;
  border-collapse: collapse;
}

.moc-specs-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.moc-specs-table tr:last-child td {
  border-bottom: none;
}

.moc-specs-group td {
  background: #f7fafc;
  font-weight: 600;
}

/* Search box */
.moc-search-box {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.moc-search-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.moc-search-row .moc-input {
  flex: 2;
  min-width: 200px;
}

.moc-search-row .moc-select {
  flex: 1;
  min-width: 150px;
}

.moc-search-options {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
}

.moc-search-options label {
  font-size: 0.9rem;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Form */
.moc-form-group {
  margin-bottom: 1rem;
}

.moc-form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.moc-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.9rem;
  resize: vertical;
}

.moc-rating-select {
  display: flex;
  gap: 1rem;
}

.moc-rating-select label {
  font-weight: normal;
}

/* Success message */
.moc-success-message {
  background: #c6f6d5;
  color: #276749;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.moc-buttons {
  margin-top: 1.5rem;
}

/* Category description */
.moc-category-desc {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Responsive for product page */
@media (max-width: 768px) {
  .moc-product-page {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   ACCOUNT PAGES
   ================================================================ */
.moc-account-page {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.moc-account-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.moc-account-box {
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.moc-account-box h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: #1a202c;
}

.moc-account-box p {
  color: #718096;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Forms */
.moc-form-group {
  margin-bottom: 1rem;
}

.moc-form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #2d3748;
}

.moc-input,
.moc-select,
.moc-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.moc-input:focus,
.moc-select:focus,
.moc-textarea:focus {
  outline: none;
  border-color: #4299e1;
}

.moc-form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.moc-form-actions a {
  color: #4299e1;
  font-size: 0.9rem;
}

.moc-btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.moc-btn-primary:hover {
  opacity: 0.9;
  color: white;
  text-decoration: none;
}

/* Account List Page */
.moc-account-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.moc-account-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.moc-account-list li:last-child {
  border-bottom: none;
}

.moc-account-list a {
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.moc-account-list a:hover {
  color: #4299e1;
}

/* Responsive for account */
@media (max-width: 768px) {
  .moc-account-columns {
    grid-template-columns: 1fr;
  }
}

/* Form rows */
.moc-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.moc-radio-group {
  display: flex;
  gap: 1.5rem;
}

.moc-radio-group label {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

fieldset legend {
  font-weight: 600;
  padding: 0 0.5rem;
  color: #2d3748;
}

@media (max-width: 768px) {
  .moc-form-row {
    grid-template-columns: 1fr;
  }
}

/* Account sections */
.moc-account-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.moc-account-section h3 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #4299e1;
  color: #1a202c;
}

@media (max-width: 992px) {
  .moc-account-sections {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .moc-account-sections {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   BOOTSTRAP OVERRIDES для модулей
   ================================================================ */
/* Фиксируем Bootstrap элементы внутри sidebar */
.moc-sidebar .list-group {
  margin-bottom: 1rem;
}

.moc-sidebar .list-group-item {
  border-radius: 0;
  border-left: none;
  border-right: none;
  padding: 0.75rem 1rem;
  color: #4a5568;
}

.moc-sidebar .list-group-item:first-child {
  border-radius: 8px 8px 0 0;
}

.moc-sidebar .list-group-item:last-child {
  border-radius: 0 0 8px 8px;
}

.moc-sidebar .list-group-item:hover {
  background: #ebf8ff;
  color: #2b6cb0;
}

.moc-sidebar .list-group-item.active {
  background: #4299e1;
  border-color: #4299e1;
  color: white;
}

/* Product modules в sidebar */
.moc-sidebar .product-thumb {
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
}

.moc-sidebar .product-thumb img {
  width: 100%;
  height: auto;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.alert-success {
  background: #c6f6d5;
  border: 1px solid #9ae6b4;
  color: #276749;
}

.alert-danger {
  background: #fed7d7;
  border: 1px solid #feb2b2;
  color: #c53030;
}

.alert-warning {
  background: #fefcbf;
  border: 1px solid #faf089;
  color: #975a16;
}

.alert-info {
  background: #bee3f8;
  border: 1px solid #90cdf4;
  color: #2b6cb0;
}

/* ================================================================
   BOOTSTRAP GRID FIX - для стандартных шаблонов OpenCart
   ================================================================ */
/* Главный контейнер */
.moc-main .container,
.moc-main .container-fluid {
  max-width: 100%;
  padding: 0;
}

/* Row как flex */
.moc-main .row {
  display: flex !important;
  flex-wrap: nowrap !important;
  margin: 0 !important;
  gap: 24px !important;
}

/* Fallback для gap в row - margin между колонками */
.moc-main .row > #column-left {
  margin-right: 24px !important;
}

.moc-main .row > #content:not(:first-child):not(:last-child) {
  margin-right: 24px !important;
}

.moc-main .row > .col-sm-3 + .col-sm-9,
.moc-main .row > .col-sm-3 + #content {
  margin-left: 24px !important;
}

/* Левая колонка */
.moc-main #column-left,
.moc-main .col-sm-3:first-child {
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  flex-shrink: 0 !important;
  float: none !important;
}

/* Стили для левого сайдбара */
#column-left,
.moc-sidebar {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-right: 24px !important;
}

#column-left .list-group,
.moc-sidebar .list-group {
  margin: 0 -1rem;
  border-radius: 0;
  box-shadow: none;
}

#column-left .list-group-item,
.moc-sidebar .list-group-item {
  border-left: none;
  border-right: none;
  border-radius: 0;
}

/* Promo banner внутри sidebar */
#column-left .moc-promo,
.moc-sidebar .moc-promo {
  margin: -1rem -1rem 1rem -1rem;
  border-radius: 8px 8px 0 0;
}

/* Контент */
.moc-main #content,
.moc-main .col-sm-9,
.moc-main .col-sm-12 {
  flex: 1 !important;
  width: auto !important;
  max-width: none !important;
  float: none !important;
}

/* Если нет сайдбара - контент на всю ширину */
.moc-main .row > #content:only-child,
.moc-main .row > .col-sm-12:only-child {
  max-width: 100% !important;
}

/* Правая колонка */
.moc-main #column-right {
  width: 280px !important;
  min-width: 280px !important;
  flex-shrink: 0 !important;
  float: none !important;
}

/* Стили для правого сайдбара */
#column-right {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-left: 24px !important;
}

#column-right .list-group {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

#column-right .list-group-item {
  border-left: none;
  border-right: none;
  border-radius: 0;
}

#column-right .list-group-item:first-child {
  border-top: none;
}

#column-right .list-group-item:last-child {
  border-bottom: none;
}

/* Контент внутри #content */
#content {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Отступ от левого сайдбара */
.moc-sidebar + #content,
.moc-sidebar + .moc-content,
#column-left + #content,
aside + #content {
  margin-left: 24px !important;
}

/* Отступ от контента до правого сайдбара */
#content + #column-right,
#content + .moc-sidebar,
.moc-content + #column-right {
  margin-left: 24px !important;
}

#content h1, #content h2 {
  margin-top: 0;
  color: #1a202c;
}

/* Breadcrumb стандартный */
.breadcrumb {
  background: none;
  padding: 0;
  margin-bottom: 1rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb > li {
  display: flex;
  align-items: center;
}

.breadcrumb > li + li::before {
  content: '/';
  padding: 0 0.5rem;
  color: #a0aec0;
}

.breadcrumb > li > a {
  color: #718096;
}

.breadcrumb > li > a:hover {
  color: #4299e1;
}

/* Формы Bootstrap */
.form-group {
  margin-bottom: 1rem;
}

.form-group label,
.control-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #2d3748;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Buttons Bootstrap */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
  color: white;
}

.btn-default,
.btn-secondary {
  background: #edf2f7;
  color: #4a5568;
}

.btn-default:hover,
.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: #e53e3e;
  color: white;
}

.btn-success {
  background: #48bb78;
  color: white;
}

/* Panels Bootstrap */
.panel {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.panel-heading {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  background: #f7fafc;
  border-radius: 8px 8px 0 0;
}

.panel-body {
  padding: 1rem;
}

.panel-footer {
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
  background: #f7fafc;
  border-radius: 0 0 8px 8px;
}

/* Well */
.well {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.table th {
  font-weight: 600;
  background: #f7fafc;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #e2e8f0;
}

.table-striped tbody tr:nth-child(odd) {
  background: #f7fafc;
}

.table-hover tbody tr:hover {
  background: #ebf8ff;
}

/* Input groups */
.input-group {
  display: flex;
}

.input-group .form-control {
  flex: 1;
  border-radius: 4px 0 0 4px;
}

.input-group-btn .btn,
.input-group .btn {
  border-radius: 0 4px 4px 0;
}

/* Text helpers */
.text-danger {
  color: #e53e3e;
}

.text-success {
  color: #38a169;
}

.text-warning {
  color: #d69e2e;
}

.text-muted {
  color: #a0aec0;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

/* Pull helpers */
.pull-left {
  float: left;
}

.pull-right {
  float: right;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* Required asterisk */
.required .control-label::after,
.required > label::after {
  content: ' *';
  color: #e53e3e;
}

/* Responsive для Bootstrap grid */
@media (max-width: 768px) {
  .moc-main .row {
    flex-wrap: wrap !important;
    gap: 16px !important;
  }
  
  .moc-main .row > *:not(:last-child) {
    margin-right: 0 !important;
  }
  
  .moc-main .row > #column-left,
  .moc-main .row > .col-sm-3 + .col-sm-9,
  .moc-main .row > .col-sm-3 + #content {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
  
  .moc-main #column-left,
  .moc-main .col-sm-3:first-child {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }
  
  .moc-main #column-right {
    width: 100% !important;
    min-width: 100% !important;
  }
}

/* Login page columns */
#content > .row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1.5rem;
  margin: 0 !important;
}

#content > .row > .col-sm-6 {
  flex: 1 !important;
  min-width: 280px !important;
  width: auto !important;
  float: none !important;
  padding: 0 !important;
}

#content > .row > .col-sm-6 > .well {
  height: 100%;
}

#content .well h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* Buttons row */
.buttons {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.buttons .pull-right {
  float: right;
}

.buttons .pull-left {
  float: left;
}

.buttons::after {
  content: '';
  display: table;
  clear: both;
}

/* Radio & Checkbox */
.radio,
.checkbox {
  margin-bottom: 0.5rem;
}

.radio label,
.checkbox label {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.radio input[type="radio"],
.checkbox input[type="checkbox"] {
  margin: 0;
}

/* Account page - 3 columns */
#content > .row > .col-sm-4 {
  flex: 1 !important;
  min-width: 200px !important;
  float: none !important;
  padding: 0 !important;
}

#content > .row > .col-sm-4 h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #4299e1;
  color: #1a202c;
}

/* List unstyled */
.list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-unstyled li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #edf2f7;
}

.list-unstyled li:last-child {
  border-bottom: none;
}

.list-unstyled li a {
  color: #4a5568;
  display: block;
}

.list-unstyled li a:hover {
  color: #4299e1;
}

/* List group in sidebar */
.list-group {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.list-group-item {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #4a5568;
  background: white;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item:hover,
.list-group-item:focus {
  background: #ebf8ff;
  color: #2b6cb0;
  text-decoration: none;
}

.list-group-item.active {
  background: #4299e1;
  color: white;
  border-color: #4299e1;
}

/* ================================================================
   MEGA MENU - Подкатегории
   ================================================================ */
.moc-menu-item-wrap {
  position: relative;
}

.moc-menu-item-wrap.has-children:hover > .moc-submenu {
  display: block;
}

.moc-menu-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  color: #a0aec0;
  transition: transform 0.2s;
}

.moc-menu-item-wrap:hover .moc-menu-arrow {
  color: #4299e1;
}

.moc-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 250px;
  background: white;
  border-radius: 0 8px 8px 0;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.15);
  z-index: 1001;
  max-height: 400px;
  overflow-y: auto;
}

.moc-submenu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  color: #4a5568;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.moc-submenu-item:last-child {
  border-bottom: none;
}

.moc-submenu-item:hover {
  background: #ebf8ff;
  color: #2b6cb0;
  text-decoration: none;
}

/* Адаптация для мобильных */
@media (max-width: 992px) {
  .moc-submenu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    border-left: 3px solid #4299e1;
    margin-left: 1rem;
  }
  
  .moc-menu-item-wrap.has-children .moc-submenu {
    display: none;
  }
  
  .moc-menu-item-wrap.has-children.open .moc-submenu {
    display: block;
  }
}
