/* Chipoteka-inspired OpenCart 3 storefront theme
   Brand tokens from https://www.chipoteka.hr/ (--bs-primary #E31318, Rubik) */

:root {
  --ck-red: #e31318;
  --ck-red-dark: #cc1116;
  --ck-accent: #1b84e5;
  --ck-text: #171717;
  --ck-muted: #6b6b6b;
  --ck-border: #e3e3e3;
  --ck-soft: #f5f5f5;
  --ck-page: #f2f2f2;
  --ck-white: #ffffff;
  --ck-sidebar-width: 270px;
  --ck-radius: 8px;
  --ck-radius-pill: 999px;
  --ck-header-h: 72px;
}

body.theme-chipoteka {
  font-family: Rubik, sans-serif;
  font-weight: 400;
  color: var(--ck-muted);
  font-size: 14px;
  line-height: 1.5;
  background: var(--ck-page);
  width: 100%;
  margin: 0;
  padding: 0;
}

body.theme-chipoteka h1,
body.theme-chipoteka h2,
body.theme-chipoteka h3,
body.theme-chipoteka h4,
body.theme-chipoteka h5,
body.theme-chipoteka h6 {
  color: var(--ck-text);
  font-weight: 500;
}

body.theme-chipoteka a {
  color: var(--ck-text);
}

body.theme-chipoteka a:hover,
body.theme-chipoteka a:focus {
  color: var(--ck-red);
  text-decoration: none;
}

.fa {
  font-size: 14px;
}

/* Layout shell */
.ck-app {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

.ck-sidebar {
  width: var(--ck-sidebar-width);
  flex: 0 0 var(--ck-sidebar-width);
  background: var(--ck-white);
  border-right: 1px solid var(--ck-border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1040;
  display: flex;
  flex-direction: column;
}

.ck-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--ck-page);
}

.ck-content {
  flex: 1 1 auto;
  padding: 20px 24px 40px;
}

.ck-content > .container {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.ck-content #content {
  background: transparent;
}

/* Sidebar brand */
.ck-brand {
  background: var(--ck-red);
  padding: 18px 16px;
  position: relative;
}

.ck-logo,
.ck-mobile-brand {
  display: block;
}

.ck-logo img,
.ck-mobile-brand img {
  display: block;
  max-width: 180px;
  height: auto;
}

.ck-logo-text {
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ck-sidebar-close {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  padding: 0 6px;
}

/* Tabs */
.ck-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--ck-border);
}

.ck-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--ck-soft);
  color: var(--ck-text) !important;
  border-right: 1px solid var(--ck-border);
}

.ck-tab:last-child {
  border-right: 0;
}

.ck-tab.is-active {
  background: var(--ck-red);
  color: #fff !important;
}

.ck-tab i {
  font-size: 14px;
}

/* Category nav */
.ck-nav {
  flex: 1 1 auto;
  background: var(--ck-white);
  margin: 0;
  border: 0;
  border-radius: 0;
  min-height: 0;
}

.ck-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  float: none !important;
  width: 100%;
}

.ck-nav-list > li {
  border-bottom: 1px solid var(--ck-border);
  float: none !important;
  display: block;
  position: relative;
}

.ck-nav-list > li > a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px !important;
  color: var(--ck-text) !important;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  background: transparent !important;
  text-shadow: none !important;
  min-height: 0 !important;
}

.ck-nav-list > li > a:hover,
.ck-nav-list > li.open > a {
  background: var(--ck-soft) !important;
  color: var(--ck-red) !important;
}

.ck-nav-list > li > a .fa {
  color: #9c9c9c;
  font-size: 14px;
}

.ck-nav .dropdown-menu {
  display: none;
  position: static !important;
  float: none !important;
  width: 100%;
  margin: 0;
  padding: 0 0 8px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fafafa;
}

.ck-nav li.open > .dropdown-menu {
  display: block;
}

.ck-nav .dropdown-inner {
  display: block;
}

.ck-nav .dropdown-inner ul {
  display: block;
  width: 100%;
}

.ck-nav .dropdown-inner a,
.ck-nav .see-all {
  display: block;
  padding: 8px 18px 8px 28px;
  color: var(--ck-muted);
  font-size: 13px;
  text-transform: none;
  font-weight: 400;
  min-width: 0;
}

.ck-nav .dropdown-inner a:hover,
.ck-nav .see-all:hover {
  color: var(--ck-red);
  background: transparent;
  background-image: none;
}

.ck-nav .see-all {
  border-top: 1px solid var(--ck-border);
  margin-top: 4px;
  font-weight: 500;
}

.ck-sidebar-meta {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--ck-border);
}

.ck-sidebar-tools .btn-link,
.ck-sidebar-tools .btn {
  color: var(--ck-muted);
  text-shadow: none;
  padding-left: 0;
}

.ck-social {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.ck-social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ck-soft);
  color: var(--ck-muted);
  border-radius: 4px;
}

.ck-social a:hover {
  background: var(--ck-red);
  color: #fff;
}

/* Header */
.ck-header {
  background: var(--ck-white);
  border-bottom: 1px solid var(--ck-border);
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: var(--ck-header-h);
}

.ck-header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  min-height: var(--ck-header-h);
}

.ck-search-wrap {
  flex: 1 1 auto;
  max-width: 720px;
  margin: 0 auto;
}

.ck-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.ck-icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--ck-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  padding: 0;
}

.ck-icon-btn:hover,
.ck-icon-btn:focus {
  background: var(--ck-soft);
  color: var(--ck-red);
}

.ck-account {
  position: relative;
}

.ck-account .dropdown-menu {
  margin-top: 8px;
  border: 1px solid var(--ck-border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Search */
#search.ck-search {
  margin: 0;
  width: 100%;
  position: relative;
}

#search.ck-search .ck-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9c9c9c;
  z-index: 2;
  pointer-events: none;
}

#search.ck-search .form-control {
  height: 46px;
  border-radius: var(--ck-radius-pill);
  border: 1px solid var(--ck-border);
  background: var(--ck-soft);
  padding: 0 52px 0 44px;
  font-size: 14px;
  font-weight: 300;
  color: var(--ck-text);
  box-shadow: none;
}

#search.ck-search .form-control:focus {
  border-color: var(--ck-red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(227, 19, 24, 0.12);
}

#search.ck-search .input-group-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: auto;
}

#search.ck-search .btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--ck-red);
  color: #fff;
  padding: 0;
  text-shadow: none;
  box-shadow: none;
}

#search.ck-search .btn:hover {
  background: var(--ck-red-dark);
  color: #fff;
}

/* Cart */
#cart.ck-cart {
  margin: 0;
  width: auto;
}

#cart.ck-cart > .btn {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--ck-text) !important;
  text-shadow: none !important;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.2;
  min-width: 42px;
}

#cart.ck-cart > .btn:hover,
#cart.ck-cart.open > .btn {
  background: var(--ck-soft) !important;
  color: var(--ck-red) !important;
  border-radius: 8px;
}

#cart.ck-cart > .btn i {
  font-size: 18px;
  display: block;
  margin: 0 auto 2px;
}

#cart.ck-cart #cart-total {
  display: block;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#cart .dropdown-menu {
  background: #fff;
  border: 1px solid var(--ck-border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  min-width: 320px;
  z-index: 1050;
}

/* Buttons */
.btn {
  border-radius: 4px;
  font-weight: 500;
  text-shadow: none !important;
  box-shadow: none !important;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
  background-color: var(--ck-red) !important;
  background-image: none !important;
  border-color: var(--ck-red) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--ck-red-dark) !important;
  border-color: var(--ck-red-dark) !important;
}

.btn-default {
  background-image: none !important;
  background: #fff;
  border-color: var(--ck-border);
  color: var(--ck-text);
}

.btn-warning,
.btn-danger,
.btn-info,
.btn-success {
  background-image: none !important;
}

.btn-danger {
  background-color: var(--ck-red);
  border-color: var(--ck-red);
}

.dropdown-menu li > a:hover {
  background-image: none !important;
  background-color: var(--ck-red) !important;
  color: #fff !important;
}

/* Product cards */
.product-thumb {
  background: var(--ck-white);
  border: 1px solid var(--ck-border);
  border-radius: var(--ck-radius);
  overflow: hidden;
  margin-bottom: 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-thumb:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.product-thumb .image {
  background: var(--ck-soft);
  text-align: center;
  padding: 16px;
}

.product-thumb .image img {
  margin: 0 auto;
}

.product-thumb .caption {
  min-height: 0 !important;
  padding: 14px 14px 8px;
}

.product-thumb .caption h4 {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 8px;
  min-height: 38px;
}

.product-thumb .caption h4 a {
  color: var(--ck-text);
}

.product-thumb .caption p {
  display: none;
}

.product-thumb .price {
  color: var(--ck-text);
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--ck-border);
}

.product-thumb .price-new {
  font-weight: 700;
  color: var(--ck-red);
}

.product-thumb .price-old {
  color: #9c9c9c;
  font-size: 13px;
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 6px;
}

.product-thumb .price-tax {
  display: none;
}

.product-thumb .button-group {
  border-top: 1px solid var(--ck-border);
  background: #fff;
  overflow: hidden;
}

.product-thumb .button-group button {
  width: 33.333%;
  border: 0;
  background: transparent;
  color: var(--ck-muted);
  padding: 12px 0;
  font-weight: 500;
}

.product-thumb .button-group button + button {
  border-left: 1px solid var(--ck-border);
}

.product-thumb .button-group button:hover {
  color: #fff;
  background: var(--ck-red);
}

/* Section headings (modules) */
#content > h3,
.ck-content h3 {
  font-size: 28px;
  font-style: italic;
  font-weight: 500;
  color: var(--ck-text);
  margin: 28px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ck-border);
  position: relative;
}

/* Swiper / slideshow */
.swiper-viewport {
  border: 0;
  border-radius: var(--ck-radius);
  box-shadow: none;
  margin: 0 0 24px;
  background: #fff;
  overflow: hidden;
}

.swiper-pagination-bullet-active {
  background: var(--ck-red) !important;
}

/* Forms */
.form-control {
  border-radius: 4px;
  border-color: var(--ck-border);
  box-shadow: none;
  color: #363636;
}

.form-control:focus {
  border-color: var(--ck-red);
  box-shadow: 0 0 0 3px rgba(227, 19, 24, 0.12);
}

/* Breadcrumb / panels / alerts */
.breadcrumb {
  background: transparent;
  padding-left: 0;
  margin-bottom: 16px;
}

.breadcrumb > li a {
  color: var(--ck-muted);
}

.breadcrumb > li:last-child a,
.breadcrumb > .active {
  color: var(--ck-text);
  font-weight: 500;
}

.panel {
  border-radius: 8px;
  border-color: var(--ck-border);
  box-shadow: none;
}

.panel-default > .panel-heading {
  background: var(--ck-soft);
  border-color: var(--ck-border);
}

.alert {
  border-radius: 8px;
}

/* Footer */
.ck-footer {
  background: #171717;
  color: #a8a8a8;
  padding: 40px 24px 28px;
  margin-top: auto;
}

.ck-footer h5 {
  color: #fff;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.ck-footer a {
  color: #a8a8a8;
}

.ck-footer a:hover {
  color: #fff;
}

.ck-footer hr {
  border-top-color: #363636;
}

.ck-powered {
  margin: 0;
  font-size: 12px;
}

/* Mobile bar */
.ck-mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1060;
  background: var(--ck-red);
  height: 58px;
  grid-template-columns: 1fr 1fr 1fr;
}

.ck-mobile-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  width: 100%;
  padding: 0;
}

.ck-mobile-bar-item:last-child {
  border-right: 0;
}

.ck-mobile-bar-item i {
  font-size: 18px;
  margin-bottom: 2px;
}

.ck-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1035;
}

/* Responsive */
@media (max-width: 991px) {
  .ck-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18);
  }

  body.ck-sidebar-open .ck-sidebar {
    transform: translateX(0);
  }

  body.ck-sidebar-open .ck-sidebar-backdrop {
    display: block;
  }

  .ck-header {
    background: var(--ck-red);
    border-bottom: 0;
  }

  .ck-header-inner {
    padding: 10px 12px;
    gap: 8px;
  }

  .ck-mobile-brand {
    display: inline-block !important;
    margin-right: auto;
  }

  .ck-mobile-brand img {
    max-width: 130px;
    filter: none;
  }

  .ck-search-wrap {
    display: none;
  }

  .ck-header-actions .ck-icon-btn,
  .ck-header #ck-menu-toggle {
    color: #fff;
  }

  .ck-header-actions .ck-icon-btn:hover,
  .ck-header #ck-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  #cart.ck-cart > .btn,
  #cart.ck-cart > .btn:hover,
  #cart.ck-cart.open > .btn {
    color: #fff !important;
    background: transparent !important;
  }

  #cart.ck-cart #cart-total {
    display: none;
  }

  .ck-mobile-bar {
    display: grid;
  }

  .ck-content {
    padding: 16px 12px 80px;
  }

  .ck-footer {
    padding-bottom: 80px;
  }

  #content > h3,
  .ck-content h3 {
    font-size: 22px;
  }
}

@media (min-width: 992px) {
  .ck-mobile-brand,
  #ck-menu-toggle,
  .ck-sidebar-close,
  .ck-mobile-bar {
    display: none !important;
  }

  .visible-xs {
    display: none !important;
  }
}

/* Utility overrides from default OC */
.list-group a.list-group-item.active,
.list-group a.list-group-item.active:hover,
.list-group a.list-group-item.active:focus {
  background: var(--ck-red);
  border-color: var(--ck-red);
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover {
  background: var(--ck-red);
  border-color: var(--ck-red);
}

a.thumbnail:hover,
a.thumbnail:focus,
a.thumbnail.active {
  border-color: var(--ck-red);
}

/* Category module in left column (if present) */
#column-left .list-group a {
  border-radius: 0;
  border-color: var(--ck-border);
}

/* Ensure bootstrap containers inside content breathe */
@media (min-width: 1200px) {
  .ck-content .container {
    width: 100%;
  }
}

/* Catalog/demo mode: prices stay visible, purchase and customer actions do not. */
.theme-chipoteka #cart,
.theme-chipoteka #button-cart,
.theme-chipoteka #product,
.theme-chipoteka .product-thumb .button-group,
.theme-chipoteka .product-info .btn-group,
.theme-chipoteka button[onclick*="wishlist.add"],
.theme-chipoteka button[onclick*="compare.add"] {
  display: none !important;
}

.ck-catalog-notice {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  margin-left: auto;
  opacity: 0.9;
}
