/*  
Theme Name: Swapdey
Theme URI: https://swapdey.com/
Author: Your Name
Author URI: https://yourwebsite.com/
Description: Custom standalone theme inspired by BackMarket
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swapdey
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ===== BASE / RESET ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: #fff;
  color: #111;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ===== TYPOGRAPHY & LINKS ===== */
a:focus,
a:active,
a.active {
  border-bottom: 2px solid #6f42c1;
  color: #6f42c1;
}

a.logo-link:focus,
a.logo-link:active {
  border-bottom: none;
}

/* ===== SEARCH SUGGESTIONS ===== */
#search-suggestions {
  position: absolute;
  background: #fff;
  z-index: 999;
  max-height: 300px;
  overflow-y: auto;
  width: 100%;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: none;
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  color: #333;
}

.suggestion-item:hover {
  background: #f5f5f5;
  color: #6f42c1;
}

.suggestion-item.loading .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top-color: #6f42c1;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== HEADER: MAIN WRAPPER ===== */
.main-header {
  background: #fff;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* ===== UNIFIED DESKTOP HEADER LINE ===== */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  flex-wrap: nowrap;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.swapdey-logo {
  height: 36px;
  width: auto;
  display: block;
}

.header-search {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-search form {
  max-width: 600px;
  width: 100%;
  position: relative;
}

.header-search input[type="search"] {
  width: 100%;
  padding: 12px 44px 12px 16px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #666;
  background: none;
  border: none;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  font-size: 18px;
}

/* ===== ICONS ===== */
.cart-link {
  position: relative;
}


.profile-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f3f3;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
}

.profile-dropdown {
  position: relative;
}


.profile-menu.show {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.profile-menu a {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trade-in-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #222;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

/* ===== TOP BAR & SUB NAVIGATION ===== */
.top-bar {
  background: #f6f6f6;
  padding: 8px 16px;
  width: 100%;
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-nav {
  list-style: none;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.top-nav li::marker {
  display: none;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-right a,
.top-right span {
  font-size: 14px;
  color: #333;
}

.sub-nav {
  background: #fff;
  padding: 10px 16px;
  overflow-x: auto;
}

.sub-nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* header fade on product page */
header.site-header {
  transition: transform 0.3s ease;
  will-change: transform;
  position: sticky; /* or fixed depending on your layout */
  top: 0;
  z-index: 1000;
}




/* Breadcrumb Navigation */
.breadcrumb-wrap nav.woocommerce-breadcrumb {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}



/* benefit icons section */
.top-benefits {
  background: #f3f4f6;
  padding: 16px 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}




/* ===== RESPONSIVE / MEDIA QUERIES ===== */
@media (max-width: 768px) {
  .main-header,
  .top-bar,
  .sub-nav,
  .desktop-header-row {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .mobile-header-top,
  .mobile-header-bottom,
  .mobile-menu,
  .mobile-overlay,
  .mobile-toggle {
    display: none !important;
  }
}


/* ===== MOBILE MENU ===== */
.mobile-toggle {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 12px rgba(0,0,0,0.2);
  z-index: 1000;
  padding: 20px;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
}

.mobile-menu.active {
  right: 0;
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 28px;
  align-self: flex-end;
  cursor: pointer;
  margin-bottom: 20px;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-list li {
  margin-bottom: 16px;
}

.mobile-menu-list a {
  font-size: 18px;
  color: #222;
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.mobile-menu-list a:hover {
  color: #00BFFF;
}

/* ===== MOBILE HEADER: TOP BAR ALIGNMENT ===== */
.mobile-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.mobile-logo svg {
  height: 36px;
}

/* Trade-in and Menu Icons */
.mobile-header-top .trade-in-btn {
  background: #f3f3f3;
  border: none;
  padding: 8px;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-header-top .mobile-toggle {
  background: none;
  border: none;
  font-size: 24px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== MOBILE HEADER: SEARCH BAR ===== */
.mobile-header-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}

.mobile-header-bottom .header-search {
  flex: 1;
  position: relative;
}

.mobile-header-bottom input[type="search"] {
  width: 100%;
  padding: 10px 42px 10px 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
}

.mobile-header-bottom .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #666;
  background: none;
  border: none;
}

/* ===== ICONS (Cart and Profile) ===== */
.mobile-header-bottom .header-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-link,
.profile-icon {
  font-size: 18px;
  color: #222;
  background: #f3f3f3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}


.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e53935;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: bold;
  line-height: 1;
}


/* Optional smooth slide-down for profile menu */
.profile-menu {
  display: none;
  position: absolute;
  top: 44px;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 180px;
  z-index: 1001;
  flex-direction: column;
  transform: translateY(-5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}



/* === Mobile Header User Role Link === */
.mobile-user-role {
  font-weight: 500;
  font-size: 13px;
  text-align: center;
  color: #333;
  margin-top: 4px;
}

.mobile-user-role a {
  color: #333;
  text-decoration: none;
}

.mobile-user-role a:hover {
  color: #00BFFF;
}


.products.columns-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-link {
  display: block;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px;
  transition: box-shadow 0.2s ease;
}

.product-link:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.product-image img {
  width: 100%;
  border-radius: 6px;
}

.product-price {
  font-weight: bold;
  font-size: 18px;
  margin: 8px 0;
}

.product-badges .badge {
  display: inline-block;
  background: #00bfa5;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 12px;
  margin-top: 6px;
}

.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #ddd;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.compare-bar.hidden {
  display: none;
}

.compare-btn {
  background: #00BFFF;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

#compare-items {
  flex: 1;
  font-size: 14px;
  color: #333;
}

.clear-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  margin-left: 12px;
  cursor: pointer;
}

/* === Shop Page Styles === */
.swapdey-shop-container .shop-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
}

.category-seo-block p {
  font-size: 16px;
  color: #444;
  line-height: 1.6;
}

.category-seo-block h2 {
  font-size: 20px;
  color: #111;
  margin-top: 20px;
}


/* === To make widgets pretty === */
.widget_layered_nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget_layered_nav li {
  margin-bottom: 8px;
}

.widget_layered_nav a {
  color: #0073aa;
  text-decoration: none;
  font-size: 14px;
}

.widget_layered_nav a:hover {
  text-decoration: underline;
}

.widget_layered_nav .count {
  float: right;
  color: #777;
}


/* === FILTER ACCORDION === */
@media (max-width: 768px) {
  .accordion-wrapper .widget {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
  }

  .accordion-wrapper .widget-title {
    background: #f9f9f9;
    padding: 12px 16px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
  }

  .accordion-wrapper .widget ul {
    display: none;
    padding: 12px 16px;
  }

  .accordion-wrapper .widget.open ul {
    display: block;
  }
}

/* === SELECTED FILTER TAGS === */
.filter-chip {
  background: #f2f2f2;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-chip:hover {
  background: #e2e8f0; /* optional improvement */
}

.top-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 60px;
  background: #f7fbff;  /* Back Market style background */
  z-index: 99;
}

.selected-filters .tag {
  display: inline-block;
  background: #eee;
  padding: 4px 10px;
  margin: 4px;
  border-radius: 20px;
  font-size: 13px;
}

.selected-filters .tag button {
  background: none;
  border: none;
  margin-left: 6px;
  cursor: pointer;
  font-weight: bold;
}




/* === product hover effects === */
.product-tile {
  transition: all 0.3s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.product-tile:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Optional image zoom effect */
.product-tile a img {
  transition: transform 0.3s ease;
}

.product-tile:hover a img {
  transform: scale(1.05);
}

/* Fade-in CTA on hover */
.tile-cta {
  transition: opacity 0.3s ease;
  opacity: 0;
}

.product-tile:hover .tile-cta {
  opacity: 1;
}


/* Product Tile Font Adjustments */
.product-grid h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 8px 0 4px;
}

.products.columns-3 {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-grid .condition-badge {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 16px;
  background: #eee;
  display: inline-block;
  margin-bottom: 6px;
}

.product-grid .tile-cta .button {
  font-size: 14px;
  padding: 8px 12px;
}

/* Product Tile Compact Styling */
.product-tile h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 8px 0 4px;
}


.product-tile .condition-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 12px;
  margin-bottom: 6px;
  display: inline-block;
}

.product-tile .expand-details {
  font-size: 11px;
  cursor: pointer;
  margin-bottom: 6px;
}

.product-tile .product-meta-details {
  font-size: 11px;
  color: #666;
}

.product-tile .tile-cta .button {
  font-size: 12px;
  padding: 6px 10px;
  margin-top: 8px;
}


.product-grid {
  gap: 16px;
}



/* Prevent unnecessary product card space */
.tile-cta {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-tile:hover .tile-cta {
  height: auto;
  opacity: 1;
}

.product-tile {
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 13px;
  height: auto;
  border: none; /* remove light border for cleaner look */
}

.product-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}



/* === Star Rating Styling === */


/* ==== Force Star Rating Syling ===*/
.woocommerce .star-rating::before,
.woocommerce .star-rating span::before {
  color: #000000 !important; /* Force black */
}

.color-dots {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #999;
  display: inline-block;
}


/* === Product Star Ratings (Back Market Style) === */
.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
  margin-top: 6px;
}

.product-rating .star-rating {
  color: #000000; /* black stars */
  font-size: 13px;
  margin: 0;
  line-height: 1;
}

.product-rating .rating-text {
  font-size: 12px;
  color: #666;
}









/* === Price Formatting === */

.product-tile .price del {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
  margin-right: 6px;
}

.product-tile .price ins {
  text-decoration: none;
  color: #111;
}

/* === Custom Vertical Price Stack === */
.custom-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.2;
}

.custom-price .sale-price {
  font-weight: 600;
  color: #111;
  font-size: 14px;
}

.custom-price .original-price {
  text-decoration: line-through;
  color: #888;
  font-size: 12px;
}

.custom-price .regular-price {
  font-weight: 500;
  font-size: 14px;
  color: #111;
}

/* === FINAL PRODUCT TILE TWEAKS (BACK MARKET STYLE) === */

.product-tile img {
  max-width: 100%;
  height: 140px;
  object-fit: contain;
  margin-bottom: 8px;
}


/* Adjust product title */
.product-grid h2,
.product-tile h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 6px 0 4px;
  line-height: 1.3;
}

/* Price block spacing */
.custom-price {
  margin-top: 4px;
}

/* Rating alignment */
.star-rating {
  font-size: 13px;
  color: #f5a623;
  margin-bottom: 4px;
}

/* Color dots - Back Market style */
.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #999;
  display: inline-block;
}


ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}


/* Responsive 2 columns on small devices */
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}




/* === Page Color === */
.shop-page {
  background: #f9fbfc; /* soft light blue */
  padding: 40px 16px;
}

.container {
  background: transparent;
}


/* === Global Page Color === */
body.archive.woocommerce {
  background: #f9fbfc; /* ultra-light blue, almost white */
}

body.single-product {
  background-color: #f9fbfc; /* soft light blue */
}





/* style pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-link,
.page-current {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  border: 1px solid #ccc;
  background: #fff;
  transition: all 0.2s ease;
}

.page-link:hover {
  background-color: #f0f0f0;
}

.page-current {
  font-weight: 600;
  border: 2px solid #000;
  background-color: #000;
  color: #fff;
  cursor: default;
}

.page-ellipsis {
  font-size: 18px;
  color: #999;
  padding: 0 6px;
}




/* ==== Swapdey Single Product Page (Back Market Style) ==== */

/* Main layout */
.single-product-page {
  background: #fff;
  font-family: "Inter", sans-serif;
}

.product-main {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.product-gallery {
  flex: 1 1 45%;
}

.product-summary {
  flex: 1 1 50%;
  font-size: 15px;
}

/* Sustainability badge */
.product-summary .sustainability-badge {
  background: #e5f7ec;
  color: #1c7c54;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  display: inline-block;
  margin-bottom: 10px;
}

/* Title & rating */
.product-summary h1.product_title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
}

.star-rating {
  color: #000;
}

/* Price block */





















/* Add to cart */
.woocommerce-product-add-to-cart form.cart {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

/* Wishlist button */
.product-summary button {
  font-size: 14px;
  color: #333;
  background: none;
  border: none;
  cursor: pointer;
}

/* Trade-in link */
.trade-in-btn {
  font-size: 14px;
  color: #0073aa;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

/* Delivery & Return Info */
.product-summary ul {
  list-style: none;
  padding-left: 0;
  font-size: 14px;
  color: #444;
}

.product-summary ul li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-summary ul li i {
  width: 18px;
  color: #555;
}

/* Refurbisher Info */
.refurbisher-info {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin-top: 40px;
  font-size: 14px;
  color: #333;
}

.refurbisher-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-summary,
.product-gallery {
  max-width: 100%;
}

.woocommerce-product-gallery__image img {
  max-height: 420px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .product-main {
    flex-direction: column !important;
    gap: 24px;
  }

  .product-gallery,
  .product-summary {
    flex: 1 1 100% !important;
  }
}


/* single product image */
.product-variations-under-image {
  margin-top: 20px;
}

.variations select {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
}

/* Trade-in Slide Panel */
#tradein-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 360px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: right 0.35s ease;
    padding: 24px;
    overflow-y: auto;
    font-family: system-ui, sans-serif;
}


.tradein-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  display: none;
}

.tradein-info-panel {
  position: absolute;
  top: 0;
  right: -400px; /* Start offscreen */
  width: 400px;
  height: 100%;
  background: #fff;
  padding: 24px;
  box-shadow: -2px 0 6px rgba(0,0,0,0.1);
  overflow-y: auto;
  transition: right 0.3s ease;
}

.tradein-overlay.open .tradein-info-panel {
  right: 0; /* Slide in */
}







/* Open State */
#tradein-panel.open {
    right: 0;
}

/* Trade-in Header */
#tradein-panel h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

#tradein-panel h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Trade-in List */
#tradein-panel ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

#tradein-panel li {
    margin-bottom: 20px;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

#tradein-panel li span:first-child {
    font-size: 16px;
    margin-right: 6px;
}

/* Optional Image Styling */
#tradein-panel img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Close Button */
#tradein-panel button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* Trigger Button */
.trade-in-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #0073aa;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    font-weight: 500;
}

.trade-in-btn i {
    font-size: 15px;
}




.slitpay-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  display: none;
}

.slitpay-panel {
  position: absolute;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background: #fff;
  padding: 24px;
  box-shadow: -2px 0 6px rgba(0,0,0,0.1);
  overflow-y: auto;
  transition: right 0.3s ease;
}

.slitpay-overlay.open .slitpay-panel {
  right: 0;
}


html {
  scroll-behavior: smooth;
}


.ewaste-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 40px 20px;
}

.ewaste-panel {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}











.woocommerce-Price-amount,
.woocommerce-Price-amount bdi {
  text-decoration: none !important;
}


.woocommerce-variation-price {
  display: none !important;
}









.price-stack {
  margin-bottom: 12px;
}
.sale-price {
  color: #111;
}
.save-amount {
  background: #d4f4dd;
  color: #067c4c;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
}





/* Smooth hide/show for the big header on normal pages */
.main-header {
  position: sticky;
  top: 0;
  z-index: 999;
  transition: transform .28s ease, box-shadow .2s ease, background-color .2s ease;
  will-change: transform;
  background: #fff; /* keep it solid; adjust if you use transparency over hero */
  box-shadow: none;
}

.main-header.is-hidden {
  transform: translateY(-100%);
}

body.has-scrolled .main-header {
  box-shadow: 0 6px 18px rgba(17,24,39,.06);
}

/* optional: if you want a transparent header over a hero at top, then solid after scrolling */
body.at-top .main-header {
  background: transparent;
  box-shadow: none;
}




/* Hover tooltip */
.ajax-favorite-button {
  position: relative;
}
.ajax-favorite-button::after {
  content: attr(title);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.ajax-favorite-button:hover::after {
  opacity: 1;
}

/* Active (favorited) state */
.ajax-favorite-button.favorited {
  color: #e63946; /* red heart */
}




/* ---------------- Grade Badges (unified for Cart + Single) ---------------- */
.sd-grade-badge,
.badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid #e5e7eb;
  background:#f8fafc;
  vertical-align:middle;
}
.sd-grade-badge .dot,
.badge .dot {
  width:6px;
  height:6px;
  border-radius:50%;
}

/* Specific grade colors */
.g-swap   .dot { background:#111; }
.g-bn     .dot { background:#111; }
.g-a-plus .dot { background:#0ea5e9; } /* sky blue */
.g-a      .dot { background:#10b981; } /* green */
.g-b      .dot { background:#f59e0b; } /* amber */
.g-c-plus .dot { background:#f97316; } /* orange */
.g-c      .dot { background:#ef4444; } /* red */
.g-ba     .dot { background:#3b82f6; } /* distinct blue */
.g-bc     .dot { background:#8b5cf6; } /* distinct purple */
.g-unk    .dot { background:#9ca3af; } /* gray */

/* ===== Compact spacing between Top Bar ↔ Main Header ↔ Subnav ===== */
:root{
  /* tweak these 3 vars to taste */
  --sd-topbar-py: 4px;   /* was ~10px */
  --sd-header-py: 8px;   /* was 16px */
  --sd-subnav-py: 4px;   /* was 10px */
  --sd-divider: #eceff3; /* separator color */
}

/* Tighten vertical padding in each band */
.top-bar-inner{ padding-block: var(--sd-topbar-py) !important; }
.header-top{   padding-block: var(--sd-header-py) !important; }
.sub-nav-links{padding-block: var(--sd-subnav-py) !important; }

/* Make sure there’s no accidental margin creating gaps */
.top-bar, .main-header, .sub-nav{ margin: 0 !important; }

/* Remove borders from the outer bands to avoid double lines */
.top-bar{ border-bottom: 0 !important; }
.sub-nav{ border-top: 0 !important; }

/* Add a single, subtle separator on the main header (both sides) */
.main-header{
  border-top: 1px solid var(--sd-divider) !important;    /* between Top Bar and Main Header */
  border-bottom: 1px solid var(--sd-divider) !important; /* between Main Header and Subnav */
}

/* Ensure adjacent blocks don’t introduce spacing */
.top-bar + .main-header,
.main-header + .sub-nav{
  margin-top: 0 !important;
}

/* Mobile: also tighten the two mobile rows a touch */
@media (max-width: 768px){
  .mobile-header-top{    padding-block: 6px !important; }  /* was 8px */
  .mobile-header-bottom{ padding-block: 6px !important; }  /* was 8px */
}

/* ===== MAIN HEADER: collapse inner vertical padding ===== */
.header-top{
  /* reduce the vertical padding inside the bar */
  padding-block: 6px !important;   /* try 4–8px to taste */
}

/* make the logo a tad shorter so the row can be tighter */
.header-top .swapdey-logo{
  height: 32px !important;         /* was 40px */
}

/* kill any stray margins that add height */
.header-top .logo,
.header-top .header-search,
.header-top .header-icons{
  margin: 0 !important;
}

/* search form shouldn’t add margins */
.header-search form{
  position: relative;               /* keep suggestions positioned */
  margin: 0 !important;
}

/* tighten the search input (overrides inline padding) */
.header-search input[type="search"]{
  padding: 8px 44px 8px 12px !important;  /* was 12px top/btm */
  font-size: 15px;                         /* optional: slightly smaller */
  line-height: 1.2;
  border-radius: 8px;
}

/* keep the search icon button compact */
.header-search .search-icon{
  top: 50% !important;
  transform: translateY(-50%) !important;
  padding: 0 !important;
  height: 24px;
  width: 24px;
}

/* icons block: slightly tighter */
.header-icons{
  gap: 10px !important;
}

/* trade-in button less tall */
.trade-in-btn{
  padding: 6px 8px !important;      /* was 8px 10px */
}

/* profile button smaller hitbox but still accessible */
.profile-icon{
  padding: 6px !important;          /* was 8px */
  border-radius: 8px;
}

/* cart badge stays readable when things are tighter */
.cart-count{
  top: -4px !important;             /* was -6px */
  right: -6px !important;
  padding: 1px 6px !important;
  font-size: 11px !important;
}

/* ===== SEAMS: remove extra visual space above/below the main header ===== */
/* Remove borders on neighbors to avoid double lines */
.top-bar{ border-bottom: 0 !important; }
.sub-nav{ border-top: 0 !important; }

/* Put a single hairline on the main header so sections feel “attached” */
.main-header{
  border-top: 1px solid #eceff3 !important;
  border-bottom: 1px solid #eceff3 !important;
  margin: 0 !important;
}

/* Ensure adjacent blocks don’t add margins */
.top-bar + .main-header,
.main-header + .sub-nav{
  margin-top: 0 !important;
}

/* Optional: if you want it even tighter, drop the main-header borders entirely */
/* .main-header{ border:0 !important; } */

/* Center the subnav links (desktop) */
.sub-nav .sub-nav-links{
  justify-content: center !important; /* was left-aligned */
  /* optional helpers (safe to keep) */
  align-items: center;
  flex-wrap: wrap; /* lets it wrap nicely if it overflows */
}


/* temporary patch for low-res square phone art */
.promo-spot .tile.phone img{
  object-fit: contain;   /* don’t stretch */
  background:#f5f7fa;    /* soft pad around */
  padding:14px;          /* breathing room */
}


/* Suggestions */
.sd-suggest{ position:absolute; z-index:1002; left:0; right:0; top:calc(100% + 6px); background:#fff; border:1px solid #e5e7eb; border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.08); padding:6px; }
.sd-suggest[hidden]{ display:none !important; }
.sd-suggest-list{ list-style:none; margin:0; padding:0; max-height:340px; overflow:auto; }
.sd-suggest-item{ display:flex; align-items:center; gap:10px; padding:8px; border-radius:8px; text-decoration:none; color:#111; }
.sd-suggest-item:hover, .sd-suggest-item[aria-selected="true"]{ background:#f8fafc; }
.sd-suggest-thumb{ width:44px; height:44px; object-fit:contain; background:#fff; border:1px solid #f1f5f9; border-radius:6px; }
.sd-suggest-title{ font-weight:600; line-height:1.2; }
.sd-suggest-price{ font-size:12px; color:#374151; }
.sd-suggest-empty{ padding:10px; color:#6b7280; }

/* Center the sub-nav */
.sub-nav-links{
  justify-content: center;              /* centers the list */
  gap: 18px;                            /* keep your spacing */
}

/* "More +" item styles */
.menu-item-more{
  position: relative;
}

.more-toggle{
  appearance: none;
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
}

.more-toggle .plus{
  display: inline-block;
  transition: transform .15s ease;
}

/* The dropdown */
.more-menu{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  padding: 8px;
  list-style: none;
  margin: 0;
  display: none;               /* hidden by default */
  z-index: 1002;
}

.more-menu a{
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  color: #111;
  border-radius: 8px;
  font-weight: 600;
}

.more-menu a:hover,
.more-menu a:focus{
  background: #f8fafc;
}

/* Open state */
.menu-item-more.is-open .more-menu{
  display: block;
}
.menu-item-more.is-open .more-toggle .plus{
  transform: rotate(45deg); /* + → × */
}

/* Optional: also open on hover for pointer users */
@media (hover:hover){
  .menu-item-more:hover .more-menu{ display: block; }
  .menu-item-more:hover .more-toggle .plus{ transform: rotate(45deg); }
}

/* USER PROFILE */
.profile-dropdown { position: relative; }
.profile-menu{
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 180px; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.08);
  padding: 8px; z-index: 1003; display: none;
}
.profile-menu.is-open{ display: block; }
.profile-menu a{ display:flex; gap:8px; align-items:center; padding:8px 10px; border-radius:6px; text-decoration:none; color:#111; }
.profile-menu a:hover{ background:#f8fafc; }




.top-picks-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.top-picks-table th,
.top-picks-table td {
  border: 1px solid #e5e5e5;
  padding: 12px 10px;
  text-align: left;
}

.top-picks-table th {
  background: #f7f7f7;
  font-weight: 600;
}

.top-picks-table tr:nth-child(even) td {
  background: #fafafa;
}

.top-picks-table strong {
  color: #000;
}

@media (max-width: 640px) {
  .top-picks-table th,
  .top-picks-table td {
    font-size: 14px;
    padding: 10px 8px;
  }
}




