/**
 * NeuroPlanejar storefront skin for OpenCart 4.1.x
 * Version: 1.0.0
 * Strategy: additive CSS only; no core template override.
 */

:root {
  --np-purple: #6d2aa6;
  --np-purple-dark: #4a176f;
  --np-purple-light: #9a50d2;
  --np-green: #009b55;
  --np-green-dark: #007840;
  --np-green-soft: #dff7ea;
  --np-orange: #ff5b35;
  --np-yellow: #ffbd00;
  --np-yellow-soft: #fff4c7;
  --np-cream: #fffaf4;
  --np-text: #30243b;
  --np-muted: #6d6275;
  --np-white: #ffffff;
  --np-border: #eadff0;
  --np-radius: 24px;
  --np-radius-sm: 14px;
  --np-shadow: 0 18px 50px rgba(74, 23, 111, 0.10);
  --np-shadow-hover: 0 22px 58px rgba(74, 23, 111, 0.16);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(154, 80, 210, 0.08), transparent 30rem),
    radial-gradient(circle at 92% 8%, rgba(0, 155, 85, 0.07), transparent 28rem),
    var(--np-cream);
  color: var(--np-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

#container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

main,
#content {
  flex: 1 0 auto;
}

.container {
  width: min(100% - 32px, 1180px);
  max-width: 1180px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--np-purple-dark);
  font-weight: 800;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
}

a {
  color: var(--np-purple);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--np-green-dark);
}

:focus-visible {
  outline: 3px solid rgba(255, 189, 0, 0.75) !important;
  outline-offset: 3px;
  box-shadow: none !important;
}

/* Utility bar */
#top {
  background: linear-gradient(90deg, var(--np-purple-dark), var(--np-purple));
  border: 0;
  color: var(--np-white);
  margin: 0;
  padding: 8px 0;
}

#top .container {
  min-height: 32px;
}

#top a,
#top .btn-link,
#top .dropdown-toggle,
#top .list-inline-item {
  color: rgba(255, 255, 255, 0.92);
}

#top a:hover,
#top .btn-link:hover {
  color: var(--np-yellow);
}

#top #wishlist-total {
  display: none;
}

/* Main header */
header {
  position: sticky;
  top: 0;
  z-index: 1010;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(109, 42, 166, 0.10);
  box-shadow: 0 8px 26px rgba(74, 23, 111, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

header .container {
  padding-top: 14px;
  padding-bottom: 14px;
}

#logo img {
  width: auto;
  max-width: min(270px, 100%);
  max-height: 74px;
  object-fit: contain;
}

#search .form-control {
  min-height: 50px;
  border: 1px solid var(--np-border);
  border-radius: 999px 0 0 999px;
  background: #fcf9ff;
  padding-left: 20px;
}

#search .btn {
  min-width: 56px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: var(--np-purple);
  color: var(--np-white);
}

#search .btn:hover {
  background: var(--np-purple-dark);
}

#header-cart .btn,
#cart > .btn {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--np-green);
  color: var(--np-white);
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(0, 155, 85, 0.18);
}

#header-cart .btn:hover,
#cart > .btn:hover {
  background: var(--np-green-dark);
}

/* Navigation */
#menu {
  background: transparent;
  border: 0;
  margin-bottom: 24px;
  min-height: auto;
}

#menu .navbar-nav {
  gap: 6px;
}

#menu .nav-link {
  color: var(--np-purple-dark);
  font-weight: 750;
  border-radius: 999px;
  padding: 10px 16px;
}

#menu .nav-link:hover,
#menu .nav-link:focus,
#menu .nav-link.show {
  background: var(--np-green-soft);
  color: var(--np-green-dark);
}

#menu .dropdown-menu {
  border: 1px solid var(--np-border);
  border-radius: 18px;
  box-shadow: var(--np-shadow);
  padding: 10px;
}

#menu .dropdown-item {
  border-radius: 10px;
  padding: 9px 12px;
}

/* Breadcrumbs */
.breadcrumb {
  gap: 4px;
  margin: 10px 0 26px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(109, 42, 166, 0.08);
  border-radius: 999px;
  font-size: 0.88rem;
}

.breadcrumb a {
  color: var(--np-muted);
  text-decoration: none;
}

/* Buttons */
.btn {
  border-radius: 999px;
  font-weight: 750;
  padding: 10px 18px;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--np-purple);
  border-color: var(--np-purple);
  box-shadow: 0 10px 24px rgba(109, 42, 166, 0.16);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--np-purple-dark);
  border-color: var(--np-purple-dark);
}

.btn-success {
  background: var(--np-green);
  border-color: var(--np-green);
}

.btn-light,
.btn-secondary {
  background: var(--np-white);
  border-color: var(--np-border);
  color: var(--np-purple-dark);
}

/* Product cards */
.product-thumb {
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(109, 42, 166, 0.09);
  border-radius: var(--np-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--np-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-thumb:hover {
  transform: translateY(-5px);
  border-color: rgba(109, 42, 166, 0.22);
  box-shadow: var(--np-shadow-hover);
}

.product-thumb .image {
  background: linear-gradient(145deg, #ffffff, #fbf3ff);
  border-bottom: 1px solid rgba(109, 42, 166, 0.08);
  padding: 16px;
}

.product-thumb .image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 18px;
}

/* OpenCart 4.1 renders .content > .description + form. */
.product-thumb .content {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 22px;
}

.product-thumb .description {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: visible;
  color: var(--np-muted);
}

.product-thumb h4 {
  margin: 0 0 8px;
  font-size: 1.14rem;
  line-height: 1.3;
}

.product-thumb h4 a {
  color: var(--np-purple-dark);
  text-decoration: none;
}

.product-thumb .description > p {
  min-height: 78px;
  margin-bottom: 16px;
  color: var(--np-muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-thumb .price {
  margin-top: auto;
  color: var(--np-green-dark);
  font-size: 1.3rem;
  font-weight: 850;
}

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

.product-thumb .price-old {
  color: var(--np-muted);
  font-size: 0.95rem;
}

.product-thumb form {
  flex: 0 0 auto;
  margin-top: 16px;
}

/*
 * OpenCart 4.1.0.3 buttons do not have Bootstrap's .btn class.
 * Target the direct button elements used by product/thumb.twig.
 */
.product-thumb .button {
  display: block !important;
  padding: 0 !important;
}

.product-thumb .button > button {
  border-radius: 999px;
}

.product-thumb .button > button:first-of-type {
  display: flex !important;
  width: 100% !important;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0 !important;
  background: var(--np-green) !important;
  color: var(--np-white) !important;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 155, 85, 0.18);
}

.product-thumb .button > button:first-of-type:hover,
.product-thumb .button > button:first-of-type:focus {
  background: var(--np-green-dark) !important;
  color: var(--np-white) !important;
}

/* Wishlist and comparison are intentionally unavailable in the minimal store. */
.product-thumb .button > button:nth-of-type(n + 2),
.product-thumb button[formaction*="wishlist"],
.product-thumb button[formaction*="compare"] {
  display: none !important;
}

/* Product detail */
#product-info > .row {
  align-items: flex-start;
}

#product-info .image,
#product-info .magnific-popup,
#product-info .image-additional a {
  border-radius: var(--np-radius);
}

#product-info .magnific-popup {
  display: block;
  padding: 18px;
  background: var(--np-white);
  border: 1px solid rgba(109, 42, 166, 0.09);
  box-shadow: var(--np-shadow);
}

#product-info h1 {
  margin-bottom: 18px;
}

#product-info .price-new,
#product-info h2 {
  color: var(--np-green-dark);
  font-weight: 850;
}

/* Hide the product-page wishlist / compare group. */
#product-info form[action*="wishlist"],
#product-info form[action*="compare"] {
  display: none !important;
}

#form-product {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid rgba(109, 42, 166, 0.09);
  border-radius: var(--np-radius);
  background: var(--np-white);
  box-shadow: var(--np-shadow);
}

/* Digital products do not need a visible quantity selector. */
#form-product .input-group > .input-group-text,
#form-product #input-quantity {
  display: none;
}

#form-product .input-group {
  display: block;
}

#button-cart {
  width: 100%;
  min-height: 54px;
  background: var(--np-green);
  border-color: var(--np-green);
  color: var(--np-white);
  font-size: 1.05rem;
}

#button-cart:hover {
  background: var(--np-green-dark);
  border-color: var(--np-green-dark);
}

.nav-tabs {
  gap: 8px;
  border-bottom: 0;
  margin-top: 30px;
}

.nav-tabs .nav-link {
  border: 1px solid var(--np-border);
  border-radius: 999px;
  background: var(--np-white);
  color: var(--np-purple-dark);
  font-weight: 750;
}

.nav-tabs .nav-link.active {
  border-color: var(--np-purple);
  background: var(--np-purple);
  color: var(--np-white);
}

.tab-content {
  margin-top: 14px;
  padding: 24px;
  border: 1px solid rgba(109, 42, 166, 0.09);
  border-radius: var(--np-radius);
  background: rgba(255, 255, 255, 0.92);
}

/* Forms, account, cart and checkout */
.card,
.accordion-item,
.well {
  border: 1px solid rgba(109, 42, 166, 0.10);
  border-radius: var(--np-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(74, 23, 111, 0.07);
  overflow: hidden;
}

.card-header,
.accordion-button {
  background: #fbf7fd;
  color: var(--np-purple-dark);
  font-weight: 800;
}

.form-control,
.form-select {
  min-height: 48px;
  border-color: var(--np-border);
  border-radius: var(--np-radius-sm);
  background-color: var(--np-white);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--np-purple-light);
  box-shadow: 0 0 0 0.22rem rgba(109, 42, 166, 0.12);
}

.table {
  --bs-table-bg: transparent;
  border-color: var(--np-border);
}

.table-responsive {
  border: 1px solid rgba(109, 42, 166, 0.09);
  border-radius: 18px;
  background: var(--np-white);
}

.alert {
  border: 0;
  border-radius: 16px;
}

.pagination {
  gap: 6px;
}

.page-link {
  border-radius: 999px !important;
  color: var(--np-purple);
}

.active > .page-link,
.page-link.active {
  background: var(--np-purple);
  border-color: var(--np-purple);
}

/* Sidebar modules */
.list-group {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(74, 23, 111, 0.06);
}

.list-group-item {
  border-color: var(--np-border);
}

.list-group-item.active {
  background: var(--np-purple);
  border-color: var(--np-purple);
}

/* Footer */
footer {
  position: static;
  flex: 0 0 auto;
  margin-top: 64px;
  padding: 52px 0 24px;
  background: linear-gradient(135deg, var(--np-purple-dark), #35104f);
  color: rgba(255, 255, 255, 0.78);
}

footer h5 {
  color: var(--np-white);
  font-size: 1rem;
}

footer a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

footer a:hover {
  color: var(--np-yellow);
}

footer hr {
  border-color: rgba(255, 255, 255, 0.16);
}

/* Download/account emphasis */
#account-download .btn-primary,
#account-order .btn-primary {
  background: var(--np-green);
  border-color: var(--np-green);
}

@media (max-width: 991.98px) {
  header {
    position: static;
  }

  #logo {
    text-align: center;
    margin-bottom: 12px;
  }

  #logo img {
    max-height: 62px;
  }

  #menu {
    background: var(--np-purple-dark);
    border-radius: 18px;
    padding: 6px 10px;
  }

  #menu .navbar-toggler,
  #menu .nav-link {
    color: var(--np-white);
  }

  #menu .nav-link:hover,
  #menu .nav-link:focus,
  #menu .nav-link.show {
    background: rgba(255, 255, 255, 0.12);
    color: var(--np-white);
  }
}

@media (max-width: 575.98px) {
  .container {
    width: min(100% - 20px, 1180px);
  }

  body {
    font-size: 15px;
  }

  #top {
    font-size: 0.82rem;
  }

  .breadcrumb {
    border-radius: 16px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .product-thumb .content {
    min-height: auto;
  }

  .tab-content,
  #form-product {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
