/* ====================================
   1. CSS VARIABLES (ROOT)
   ==================================== */
:root {
  --primary-color: #ff3c5a;
  --orange-color: #ff8c00;
  --dark-bg: #121212;
  --text-light: #ffffff;
  --text-gray: #b0b0b0;
  --text-dark: #333333;
  --bg-light: #f5f5f5;
}

/* ====================================
   2. BASE STYLES
   ==================================== */
body {
  font-family: "Commissioner", sans-serif;
  overflow-x: hidden;
  background-color: var(--bg-light);
}

/* ====================================
   3. LAYOUT COMPONENTS
   ==================================== */

.navbar.navbar-dark {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 15px 0;
  position: absolute;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.navbar.navbar-dark .navbar-collapse {
  text-align: center;
}

.navbar.navbar-dark .navbar-brand img {
  height: 30px;
}

.navbar.navbar-dark .nav-link {
  color: var(--text-light);
  margin: 0 10px;
  font-size: 16px;
}

.navbar.navbar-dark .contact-info-container {
  display: flex;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  margin-right: 15px;
  align-items: center;
}

.navbar:not(.navbar-dark) {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 15px 0;
  position: absolute;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.navbar:not(.navbar-dark) .navbar-brand img {
  height: 30px;
  max-height: 50px;
}

.navbar:not(.navbar-dark) .nav-link {
  color: var(--text-light);
  font-size: 16px;
  color: white;
}

.navbar:not(.navbar-dark) .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

.navbar:not(.navbar-dark) .navbar-toggler-icon {
  display: inline-block;
  width: 30px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.navbar:not(.navbar-dark)
  .navbar-collapse.show
  + .navbar-toggler
  .navbar-toggler-icon,
.navbar:not(.navbar-dark)
  .navbar-toggler[aria-expanded="true"]
  .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cline x1='6' y1='6' x2='24' y2='24' stroke='white' stroke-width='2'/%3e%3cline x1='24' y1='6' x2='6' y2='24' stroke='white' stroke-width='2'/%3e%3c/svg%3e");
}

.navbar:not(.navbar-dark) .nav-link.btn {
  background-color: #343a40;
  color: white;
  border: 1px solid #495057;
}

.navbar:not(.navbar-dark) .navbar-collapse.show {
  display: block !important;
}

.navbar:not(.navbar-dark) .navbar-collapse {
  display: none;
}

@media (min-width: 992px) {
  .navbar:not(.navbar-dark) .navbar-collapse {
    display: flex !important;
  }
}

/* ----- 3.3 Contact Info ----- */
.contact-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.contact-info {
  display: flex;
  align-items: center;
  color: var(--text-light);
  font-size: 16px;
  margin-right: 20px;
}

.contact-text {
  font-size: 16px;
  color: white;
}

.contact-info-container {
  display: flex;
  position: static;
  transform: none;
  font-size: 14px;
  margin-right: 30px;
  align-items: center;
}

.contact-info-container-mobile {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

/* ----- 3.4 Hero Section ----- */
.hero-section {
  background: url("/static/shop/images/bg1.png") no-repeat center center;
  background-size: cover;
  color: var(--text-light);
  padding: 100px 0;
  max-height: 450px;
  position: relative;
}

.hero-title {
  font-size: 35px;
  font-weight: 700;
  margin-bottom: 15px;
  justify-self: center;
  top: 30px;
  position: relative;
  text-align: center;
  font-family: "Tektur", sans-serif;
}

.hero-subtitle {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 25px;
  color: var(--text-gray);
}

/* ----- 3.5 Connect Section ----- */
.connect {
  background-image: url("/static/shop/images/connect.png");
  color: white;
  align-content: center;
  justify-self: center;
  overflow: hidden;
  margin: 80px 0;
  max-height: 400px;
  padding: 0px 60px;
  background-size: 100% auto;
}

/* ----- 3.6 Features Section ----- */
.features-section {
  padding: 40px 0;
  margin-top: -100px;
  position: relative;
  z-index: 10;
}

/* ----- 3.7 About Section ----- */
.about-section {
  padding: 80px 0;
}

/* ----- 3.8 Footer ----- */
.footer {
  background-color: #000000;
  color: #ffffff;
  padding: 30px 0;
}

.footer-logo {
  max-width: 150px;
  height: auto;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: start;
  margin-bottom: 20px;
}

.footer-contact-container {
  width: 100%;
}

.footer-contact-column {
  flex: 1;
}

.footer-contact-column:first-child {
  margin-right: 20px;
}

/* ====================================
   4. UI COMPONENTS
   ==================================== */

/* ----- 4.1 Buttons ----- */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 500;
  border-width: 0px;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 2px -2px 10px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  box-shadow: 3px -3px 15px rgba(0, 0, 0, 0.3);
}

.buy-btn {
  color: var(--primary-color);
  font-weight: bold;
  height: 50px;
  line-height: 35px;
  transition: all 0.3s ease;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
}

.buy-btn:hover {
  background-color: rgba(0, 0, 0, 0);
  color: var(--dark-bg);
  box-shadow: 3px -3px 15px rgba(0, 0, 0, 0.3);
}

.button-group {
  font-size: 18px;
  position: absolute;
  bottom: 0px;
  left: 0px;
  align-items: center;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.btn-outline-secondary {
  white-space: nowrap;
  display: flex;
  align-items: center;
}

/* ----- 4.2 Product Cards ----- */
.product-card {
  background-color: white;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  transition: box-shadow 0.3s;
  width: 100%;
  border: 1px solid white;
  overflow: hidden;
  position: relative;
  padding: 15px;
  min-height: 180px;
}

.product-card > div:first-child {
  flex: 1;
  min-width: 0;
  padding-right: 5px;
  z-index: 1;
}

.image-wrapper,
.image-wrapper2 {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: start;
  width: 120px;
  height: 120px;
  position: relative;
  align-self: center;
}

.product-image {
  width: 200px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ----- 4.3 Menu Items ----- */
.menu-item {
  position: relative;
  cursor: pointer;
  padding: 10px 0;
  transition: font-weight 0.3s;
  flex: 0 1 auto;
  text-align: center;
}

/* ----- 4.4 Gallery Items ----- */
.gallery-item img {
  width: 90%;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s ease;
  justify-self: center;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ----- 4.5 Categories & Modal ----- */
.categories {
  width: 200px;
  padding-left: 10px;
}

.categories h3 {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
}

.category-item {
  margin-bottom: 10px;
  font-size: 16px;
}

.category-item input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.1);
}

.all-categories {
  border-top: 1px solid #ccc;
  padding-top: 15px;
  margin-top: 15px;
}

/* Modal styles */
.modal-overlay {
  display: none;
  background: rgba(0, 0, 0, 0.8);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  overflow: auto;
}

.modal-overlay:target {
  display: block;
}

.modal-container {
  min-height: 100vh;
  display: flex;
  align-items: center; /* Center vertically when content fits */
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  max-width: 1200px;
  border-radius: 12px;
  margin: 20px 0;
  background: transparent;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  text-decoration: none;
}

.modal-close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-close:hover {
  opacity: 0.8;
}

.image-div {
  width: 90%;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
  margin: 20px auto 0;
}

.product-images {
  flex-direction: row;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: nowrap;
}

.product-image-container {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

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

.text-div {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin: 0 20px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  top: -100px;
  z-index: 1;
  padding-top: 120px;
}

.product-description h3 {
  font-size: 17px;
}

.product-description p {
  margin-bottom: 15px;
}

.product-description ul {
  list-style: none;
  padding: 0;
}

.product-description li {
  padding: 4px 0;
  position: relative;
  padding-left: 18px;
}

.product-description li:before {
  content: "•";
  font-weight: bold;
  position: absolute;
  left: 0;
}

.product-description li:last-child {
  border-bottom: none;
}

/* Responsive modal styles */
@media (max-width: 768px) {
  .modal-container {
    padding: 10px;
  }

  .modal-body {
    margin: 10px 0;
  }

  .image-div {
    width: 95%;
    margin: 10px auto 0;
    padding: 15px;
  }

  .product-images {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 15px;
  }

  .product-image-container {
    height: 200px;
  }

  .text-div {
    margin: 0 10px 10px;
    top: -60px;
    padding: 15px;
    padding-top: 80px;
  }

  .modal-close {
    position: fixed;
    top: 5px;
    right: 50%;
    transform: translateX(50%);
    z-index: 20;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
  }
}

@media (max-width: 560px) {
  .modal-container {
    padding: 5px;
  }

  .image-div {
    width: 86%;
    padding: 15px;
  }

  .product-images {
    gap: 10px;
  }

  .product-image-container {
    height: 170px;
  }

  .text-div {
    padding: 15px;
    padding-top: 60px;
    top: -40px;
  }

  .modal-close {
    position: fixed;
    top: 5px;
    right: 50%;
    transform: translateX(50%);
    z-index: 20;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
  }
}

/* Support for older browsers without :has() */
@supports not (selector(:has(*))) {
  body {
    overflow: auto;
  }

  .modal-overlay:target {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
  }

  .modal-overlay:target + * {
    display: none;
  }
}

/* ----- 4.6 Categories ----- */
.categories h3,
.categories .section-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
}

.category-icon {
  width: 16px;
  height: 16px;
}

.all-categories {
  border-top: 1px solid #ccc;
  padding-top: 5px;
  margin-top: 5px;
}

.offcanvas-end {
  width: 250px;
}

.offcanvas-body .categories {
  width: 100%;
}

/* ====================================
   5. TYPOGRAPHY
   ==================================== */
.about-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: start;
  font-family: "Montserrat", sans-serif;
}

.about-text {
  font-size: 16px;
  line-height: 1.6;
  color: black;
  margin-bottom: 25px;
  font-family: "Montserrat", sans-serif;
}

.product-title {
  color: #dc3545;
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-subtitle {
  color: #6c757d;
  margin-bottom: 5px;
  font-size: 1rem;
  position: relative;
  padding-left: 12px;
}

.section-subtitle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 2px;
  background-color: red;
  border-radius: 2px;
}

.section-title {
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
}

.footer-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.footer-contact-item {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 5px;
}

/* ====================================
   6. UTILITY CLASSES
   ==================================== */

/* ----- 6.1 Alignment Classes ----- */
.about-align {
  align-items: center;
}

.competence-align {
  align-items: start;
}

.footer-align {
  align-items: center;
}

/* ----- 6.2 Decorative Elements ----- */
.red-line {
  height: 5px;
  background-color: #dc3545;
  display: block;
}

.gray-line {
  height: 3px;
  background-color: #ccc;
  display: block;
  margin: 0 10px;
}

.orange-line {
  display: block;
  width: 200px;
  height: 5px;
  background-color: var(--orange-color);
  margin: 20px 0;
}

/* ====================================
   7. MEDIA QUERIES
   ==================================== */

/* ----- 7.1 Desktop View (992px and up) ----- */
@media (min-width: 992px) {
  .contact-info-container-mobile {
    display: none;
  }

  .contact-info-container {
    justify-content: center;
    gap: 20px;
  }

  .navbar > .container-fluid {
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
  }

  .navbar-nav {
    justify-content: center;
    flex-grow: 0;
  }

  .nav-link {
    padding: 8px 15px;
    white-space: nowrap;
  }
}

/* ----- 7.2 Large Devices (992px to 1199px) ----- */
@media (min-width: 992px) and (max-width: 1199px) {
  .product-card {
    flex-direction: column;
    min-height: auto;
    padding-right: 15px;
  }

  .image-wrapper {
    width: 160px;
    height: 160px;
    margin: 15px auto;
    position: relative;
    top: auto;
    right: auto;
  }

  .product-image {
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
  }

  .product-card > div:first-child {
    padding-right: 0;
    max-width: 100%;
  }

  .button-group {
    position: static;
    justify-content: center;
    margin-top: 10px;
  }
}

/* ----- 7.3 Extra Large Devices (1200px and down) ----- */
@media (max-width: 1199px) {
  .navbar-expand-lg .navbar-collapse {
    display: none !important;
  }

  .navbar-expand-lg .navbar-collapse.show {
    display: block !important;
  }

  .navbar-expand-lg .navbar-toggler {
    display: block;
  }

  .navbar-expand-lg.navbar-dark .navbar-nav {
    flex-direction: column;
  }

  .navbar-collapse {
    text-align: center;
    margin-top: 15px;
  }

  .navbar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50%;
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ----- 7.4 Medium to Large Devices (768px to 1000px) ----- */
@media (min-width: 768px) and (max-width: 1000px) {
  .product-card {
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: auto;
  }

  .product-card > div:first-child {
    padding-right: 0;
    max-width: 100%;
    text-align: center;
  }

  .image-wrapper,
  .image-wrapper2 {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 10px auto;
  }

  .product-image {
    width: 160px;
    height: auto;
  }

  .button-group {
    position: static;
    justify-content: center;
    margin-top: 15px;
  }
}

/* ----- 7.5 Tablets and Below (991px and down) ----- */
@media (max-width: 991px) {
  .features-section {
    margin-top: -40px;
  }

  .gallery-item img {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
  }

  .about-section .text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .about-section .gap-3 {
    gap: 1rem;
  }

  .footer .row {
    flex-direction: column;
    align-items: center;
  }

  .footer-column {
    width: 100%;
    margin-bottom: 30px;
    text-align: center;
  }

  .footer-contact-container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .navbar-nav {
    flex-direction: column;
    width: 100%;
  }

  .nav-link {
    position: relative;
    display: block;
    width: 100%;
    text-align: center;
    padding: 15px 0;
    font-size: 18px;
    color: var(--text-light);
  }

  .nav-link::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: #626262;
  }

  .nav-link.btn {
    background-color: transparent !important;
    border: none !important;
    color: var(--text-light) !important;
  }

  .nav-link.btn:hover {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--text-light) !important;
  }
}

/* ----- 7.6 Mobile Devices (768px and down) ----- */
@media (max-width: 768px) {
  .hero-title {
    top: 0px;
    font-size: 28px;
  }

  .connect {
    height: 500px;
    background-repeat: no-repeat;
    background-size: auto 100%;
  }

  .contact-info-container {
    position: static;
    transform: none;
    justify-content: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
  }

  .product-title {
    font-size: 20px;
  }

  .contact-info-container-mobile {
    order: -1;
    margin-right: 10px;
  }

  .navbar-brand {
    order: 0;
  }

  .navbar-toggler {
    order: 1;
  }

  .navbar .container {
    flex-wrap: nowrap;
  }

  .contact-info {
    margin-bottom: 5px;
  }

  .about-section {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .about-text {
    text-align: start;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-contact-container {
    flex-direction: column;
    align-items: center;
  }

  .footer-contact-column {
    width: 100%;
    margin-bottom: 20px;
  }

  .footer-contact-column:first-child {
    margin-right: 0;
  }

  .btn-outline-secondary {
    font-size: 14px;
    padding: 8px 12px;
  }
}

/* ----- 7.7 Small Mobile Devices (767px and down) ----- */
@media (max-width: 767px) {
  .contact-info-container-mobile .contact-text {
    display: none;
  }

  .contact-info {
    margin-right: 10px;
    font-size: 12px;
  }

  .contact-icon {
    width: 24px;
    height: 24px;
  }

  .navbar-brand img {
    height: 25px;
  }

  .product-card {
    min-height: 190px;
  }

  .image-wrapper,
  .image-wrapper2 {
    width: 140px;
    height: 140px;
    position: absolute;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
  }

  .image-wrapper {
    margin-right: -30px;
    margin-bottom: -30px;
  }

  .image-wrapper2 {
    margin-right: -5px;
    margin-bottom: -5px;
  }

  .product-image {
    width: 180px;
  }

  .product-card > div:first-child {
    padding-right: 100px;
    max-width: 100%;
  }

  .section-title {
    font-size: 1rem;
  }

  .section-subtitle {
    font-size: 0.85rem;
  }
}

/* ----- 7.8 Extra Small Devices (576px and down) ----- */
@media (max-width: 576px) {
  .hero-section {
    min-height: 460px;
    padding-top: 220px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .about-section {
    padding: 40px 0;
  }

  .features-section .row {
    margin-top: -40px;
  }

  .footer-logo {
    max-width: 120px;
  }

  .footer-title {
    font-size: 16px;
  }

  .footer-contact-item {
    font-size: 12px;
  }
}

.contact-link {
  color: inherit;
  text-decoration: none;
}

.copy-tooltip {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 4px 8px;
  position: absolute;
  z-index: 1;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.contact-info.position-relative:hover .copy-tooltip,
.contact-info.position-relative.show-tooltip .copy-tooltip {
  visibility: visible;
  opacity: 1;
}

.contact-form-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  min-height: 300px;
  margin: 0 auto;
}

.form-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 25px;
  text-align: start;
  color: #333;
  font-family: "Montserrat", sans-serif;
}

.contact-form .form-group {
  position: relative;
  margin-bottom: 20px;
}

.contact-form input {
  width: 100%;
  padding: 10px 10px 10px 40px;
  border: none;
  border-bottom: 1px solid #ddd;
  font-size: 16px;
  color: #333;
  background-color: transparent;
  transition: border-color 0.3s;
}

.contact-form input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.contact-form label {
  position: absolute;
  left: 0;
  top: 10px;
  color: #777;
}

.icon-form {
  font-size: 16px;
  color: #777;
  margin-right: 10px;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 4px;
  transition: all 0.3s ease;
  width: 40%;
  margin-top: 10px;
  font-size: 16px;
  letter-spacing: 1px;
  font-weight: bold;
  display: block;
}

.btn-primary:hover {
  background-color: #e0354e;
  border-color: #e0354e;
}
