
/*
Theme Name: Karpart Child
Template: karpart
Description: Child theme for the Karpart Theme
Author: Your Name
Version: 1.0
*/

/* ==========================================================
   CUSTOM LOGIN / LOGOUT SHORTCODE + DROPDOWN
   ========================================================== */

.custom-login-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  background-color: #121b28;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  position: relative;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-login-links:hover {
  background-color: #192433;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Links */
.custom-login-links a {
  color: #4cc0ff;
  text-decoration: none;
  transition: color 0.2s ease;
}
.custom-login-links a:hover {
  color: #00aaff;
  text-decoration: underline;
}

/* Username */
.custom-login-links span.username {
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
}

/* Icon */
.custom-login-links i {
  font-size: 18px;
  color: #4cc0ff;
  margin-right: 6px;
  vertical-align: middle;
}

/* Responsive tweak */
@media (max-width: 768px) {
  .custom-login-links {
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    padding: 8px 10px;
  }
}

/* ===== Dropdown ===== */
.custom-login-links.has-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Dropdown container */
.custom-account-dropdown {
  display: block;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background-color: #1c2430;
  border: 1px solid #0f1620;
  border-radius: 8px;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  min-width: 190px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  z-index: 9999;

  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  transition: all 0.25s ease;
  pointer-events: none;
}

/* Show dropdown on hover */
.custom-login-links.has-dropdown:hover .custom-account-dropdown {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

/* Dropdown items */
.custom-account-dropdown li {
  padding: 8px 18px;
}
.custom-account-dropdown li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.custom-account-dropdown li a {
  color: #e5f1ff;
  text-decoration: none;
  display: block;
  font-weight: 500;
  transition: all 0.2s ease;
}
.custom-account-dropdown li a:hover {
  background-color: #263140;
  color: #4cc0ff;
  padding-left: 22px;
  border-radius: 4px;
}

/* ===== Center Alignment Fix ===== */
.elementor-widget-shortcode,
.elementor-widget-shortcode .elementor-widget-container,
.elementor-widget-shortcode .custom-login-links {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100%;
  margin: 0 auto !important;
  text-align: center;
}

/* ===== "Logga in för att se priser" ===== */
.login-to-see-price {
  background: #f4f7fa;
  border: 1px dashed #0073aa;
  color: #121b28;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  margin-top: 6px;
}
.login-to-see-price a {
  color: #0073aa;
  text-decoration: none;
  font-weight: 600;
}
.login-to-see-price a:hover {
  text-decoration: underline;
}

/* ==========================================================
   CUSTOM SIGNUP FORM
   ========================================================== */

.custom-signup-container {
  max-width: 450px;
  margin: 60px auto;
  background: #ffffff;
  padding: 40px 35px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.custom-signup-container h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #111;
}

.custom-signup-container form p {
  margin-bottom: 18px;
}

.custom-signup-container label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.custom-signup-container input[type="text"],
.custom-signup-container input[type="email"],
.custom-signup-container input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f6f9fc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-signup-container input:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
  outline: none;
  background: #fff;
}

/* Button styling */
/* =============================
  /* =============================
   Force Login Button Styling
   ============================= */
.custom-login-container .login-btn {
  width: 100% !important;
  padding: 14px 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  background-color: #0073aa !important; /* Your blue */
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 3px 8px rgba(0, 115, 170, 0.25) !important;
  display: block !important;
}

.custom-login-container .login-btn:hover {
  background-color: #005f8d !important;
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.35) !important;
  transform: translateY(-1px) !important;
}

.custom-login-container .login-btn:active {
  background-color: #004f78 !important;
  transform: scale(0.98) !important;
  box-shadow: 0 2px 6px rgba(0, 115, 170, 0.25) !important;
}



.custom-signup-container button[type="submit"]:hover {
  background-color: #005f8d;
}

.custom-signup-container button[type="submit"]:active {
  transform: scale(0.98);
}

/* Link section */
.custom-signup-container p a {
  color: #0073aa;
  text-decoration: none;
  font-weight: 600;
}
.custom-signup-container p a:hover {
  text-decoration: underline;
}

/* Success / error messages */
.custom-signup-container p[style*="color:green;"],
.custom-signup-container p[style*="color:red;"] {
  text-align: center;
  font-weight: 500;
  margin-bottom: 20px;
}


/* ==========================================================
   CUSTOM LOGIN FORM (Show Password + Remember Me)
   ========================================================== */

.custom-login-container {
  max-width: 420px;
  margin: 60px auto;
  background: #ffffff;
  padding: 40px 35px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.custom-login-container h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #111;
}

.custom-login-form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.custom-login-form input[type="text"],
.custom-login-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f6f9fc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-login-form input:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
  outline: none;
  background: #fff;
}

.password-wrapper {
  position: relative;
}
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 16px;
  color: #0073aa;
  user-select: none;
  transition: color 0.2s ease;
}
.toggle-password:hover {
  color: #005f8d;
}

.remember-me {
  display: flex;
  align-items: center;
  margin-top: 10px;
  font-size: 14px;
  color: #444;
}

.custom-login-form input[type="checkbox"] {
  margin-right: 6px;
  accent-color: #0073aa;
}

.login-btn {
  width: 100%;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.login-btn:hover {
  background-color: #005f8d;
}
.login-btn:active {
  transform: scale(0.98);
}

.signup-link {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}
.signup-link a {
  color: #0073aa;
  font-weight: 600;
  text-decoration: none;
}
.signup-link a:hover {
  text-decoration: underline;
}

/* =============================
   Signup Button (Same as Login)
   ============================= */
.custom-signup-container button[type="submit"] {
  width: 100% !important;
  padding: 14px 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  background-color: #0073aa !important; /* same blue */
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 3px 8px rgba(0, 115, 170, 0.25) !important;
  display: block !important;
}

.custom-signup-container button[type="submit"]:hover {
  background-color: #005f8d !important;
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.35) !important;
  transform: translateY(-1px) !important;
}

.custom-signup-container button[type="submit"]:active {
  background-color: #004f78 !important;
  transform: scale(0.98) !important;
  box-shadow: 0 2px 6px rgba(0, 115, 170, 0.25) !important;
}

/* Header account swap */
.elementor-widget-karpart-vertical-menu .custom-login-links {
  width: 100%;
  min-height: 54px;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  box-shadow: none;
}

.elementor-widget-karpart-vertical-menu .custom-login-links:hover {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.elementor-widget-karpart-vertical-menu .custom-login-links i,
.elementor-widget-karpart-vertical-menu .custom-login-links a,
.elementor-widget-karpart-vertical-menu .custom-login-links span.username {
  color: #ffffff;
}

.elementor-widget-karpart-vertical-menu .custom-login-links a:hover {
  color: #e2f7fd;
}

.elementor-widget-karpart-vertical-menu .custom-login-links .username {
  font-size: 15px;
  font-weight: 700;
}

.elementor-widget-karpart-vertical-menu .custom-account-dropdown {
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
}

/* Hide the old duplicate account block below the search bar */
.elementor-element-524ef84 {
  display: none !important;
}

/* Vehicle category strip */
.vehicle-category-strip-wrap {
  background: #21262d;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 24px;
}

.vehicle-category-strip {
  max-width: 1730px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
}

.vehicle-category-strip::-webkit-scrollbar {
  display: none;
}

.vehicle-category-item {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.vehicle-category-strip__link {
  color: #f3f6f8;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.vehicle-category-strip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 22px;
  color: #f3f6f8;
  flex-shrink: 0;
}

.vehicle-category-strip__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.vehicle-category-strip__link:hover,
.vehicle-category-strip__link.is-active {
  color: #ffffff;
  border-bottom-color: #00b9f1;
  background: rgba(255, 255, 255, 0.04);
}

.vehicle-category-strip__label {
  white-space: nowrap;
}

.vehicle-category-strip__toggle {
  display: none !important;
  border: 0;
  background: transparent;
  color: #f3f6f8;
  padding: 0 8px 0 0;
  cursor: pointer;
}

.vehicle-category-strip__toggle-icon {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.vehicle-category-strip__panel {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 420px;
  max-width: 1100px;
  background: #ffffff;
  color: #2f3742;
  box-shadow: 0 18px 40px rgba(10, 20, 35, 0.16);
  border: 1px solid rgba(30, 36, 48, 0.08);
  padding: 28px 30px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 60;
}

.vehicle-category-strip__active-panel {
  display: none !important;
  max-width: 1730px;
  margin: 0 auto;
}

.vehicle-category-strip__active-panel .vehicle-category-strip__panel {
  position: static;
  min-width: 0;
  max-width: none;
  width: 100%;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  margin-top: 0;
  border-top: 1px solid rgba(30, 36, 48, 0.08);
  box-shadow: 0 18px 40px rgba(10, 20, 35, 0.1);
  z-index: 1;
}

.vehicle-category-item.has-children:hover .vehicle-category-strip__panel,
.vehicle-category-item.is-open .vehicle-category-strip__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.vehicle-category-item.is-open .vehicle-category-strip__toggle-icon {
  transform: rotate(-135deg);
}

.vehicle-category-strip__panel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 34px 42px;
}

.vehicle-category-strip__section-title {
  margin: 0 0 14px;
  color: #434a54;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.vehicle-category-strip__section-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vehicle-category-strip__section-item {
  color: #4f5761;
  font-size: 16px;
  line-height: 1.45;
}

.vehicle-category-strip__section-item + .vehicle-category-strip__section-item {
  margin-top: 8px;
}

@media (max-width: 1199px) {
  .vehicle-category-strip-wrap {
    padding: 0 18px;
  }

  .vehicle-category-strip {
    justify-content: flex-start;
    gap: 6px;
  }

  .vehicle-category-strip__link {
    padding: 16px 14px;
    font-size: 13px;
  }

  .vehicle-category-strip__panel {
    min-width: 360px;
    max-width: 920px;
    padding: 24px 24px;
  }

  .vehicle-category-strip__active-panel .vehicle-category-strip__panel {
    max-width: none;
  }

  .vehicle-category-strip__panel-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 28px 30px;
  }
}

@media (max-width: 991px) {
  .vehicle-category-strip-wrap {
    padding: 0 14px;
  }

  .vehicle-category-strip {
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 0;
    scroll-snap-type: x proximity;
    overflow-x: auto;
    overflow-y: visible;
  }

  .vehicle-category-strip__link {
    padding: 12px 14px;
    font-size: 12px;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    scroll-snap-align: start;
  }

.vehicle-category-strip__icon {
  width: 28px;
  height: 18px;
}

.vehicle-category-strip__subcategories {
  background: #f5f7fa;
  padding: 22px 18px 10px;
}

.vehicle-category-strip__subcategories .woocommerce {
  margin: 0;
}

.lastbildelar-product-legal-notice {
  max-width: 980px;
  margin: 40px auto;
  padding: 28px 32px;
  background: #f5f7fa;
  border: 1px solid #e3e8ee;
  border-radius: 12px;
}

.lastbildelar-product-legal-notice h2 {
  margin-bottom: 16px;
}

.lastbildelar-product-legal-notice p {
  color: #4f5761;
  font-size: 15px;
  line-height: 1.75;
}

.lastbildelar-product-legal-notice p:last-child {
  margin-bottom: 0;
}

  .vehicle-category-strip__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .vehicle-category-item {
    align-items: stretch;
  }

  .vehicle-category-item.has-children {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
  }

  .vehicle-category-item.has-children .vehicle-category-strip__link {
    border: 0;
    background: transparent;
    min-width: 0;
  }

  .vehicle-category-strip__panel {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    min-width: 320px;
    max-width: 80vw;
    padding: 20px;
  }

  .vehicle-category-strip__active-panel .vehicle-category-strip__panel {
    position: static;
    max-width: none;
    width: 100%;
    margin-top: 10px;
  }

  .vehicle-category-strip__panel-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 22px;
  }

  .vehicle-category-strip__section-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .vehicle-category-strip__section-item {
    font-size: 14px;
  }
}

@media (max-width: 767px) {
  .elementor-location-header {
    min-height: auto;
  }

  .elementor-widget-karpart-vertical-menu .custom-login-links {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-height: 48px;
    padding: 10px 14px;
    gap: 10px;
  }

  .elementor-widget-karpart-vertical-menu .custom-login-links .username {
    font-size: 14px;
  }

  .elementor-widget-karpart-vertical-menu .custom-account-dropdown {
    min-width: 220px;
    left: 0;
    right: auto;
  }

  .vehicle-category-strip-wrap {
    padding: 0 12px;
  }

  .vehicle-category-strip {
    gap: 10px;
    padding: 10px 0 12px;
  }

  .vehicle-category-strip__link {
    min-width: 110px;
    padding: 12px 12px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 7px;
  }

  .vehicle-category-strip__icon {
    width: 30px;
    height: 20px;
  }

  .vehicle-category-strip__label {
    white-space: normal;
    line-height: 1.2;
    text-wrap: balance;
  }

  .vehicle-category-item {
    flex-direction: column;
    align-items: stretch;
  }

  .vehicle-category-item.has-children .vehicle-category-strip__toggle {
    align-self: center;
    margin: -4px 0 8px;
    padding: 0 0 8px;
  }

  .vehicle-category-strip__panel {
    position: static;
    min-width: 0;
    max-width: none;
    margin-top: 8px;
    padding: 16px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    display: none;
    box-shadow: none;
    border-radius: 12px;
  }

  .vehicle-category-strip__active-panel .vehicle-category-strip__panel {
    display: block;
    margin-top: 8px;
  }

  .vehicle-category-item.has-children:hover .vehicle-category-strip__panel {
    display: none;
  }

  .vehicle-category-item.is-open .vehicle-category-strip__panel {
    display: block;
  }

  .vehicle-category-strip__panel-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .elementor-widget-karpart-vertical-menu .custom-login-links {
    padding: 9px 12px;
  }

  .vehicle-category-strip-wrap {
    padding: 0 10px;
  }

  .vehicle-category-strip {
    gap: 8px;
    padding: 8px 0 10px;
  }

  .vehicle-category-strip__link {
    min-width: 100px;
    padding: 11px 10px;
    font-size: 11px;
  }

  .vehicle-category-strip__icon {
    width: 28px;
    height: 18px;
  }
}

