/* =========================================================
   EPAuto Amazon Brand Store — Common Stylesheet
   Shared across all Brand Store pages
   ========================================================= */

:root {
  --amz-font: "Amazon Ember", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-color: #f7f8f8;
  --card-bg: #ffffff;
  --text-main: #0f1111;
  --text-muted: #565959;
  --text-price: #b12704;
  --link-color: #007185;
  --link-hover: #c7511f;
  --border-color: #d5d9d9;
  --border-light: #e7e7e7;
  --accent-color: #ffd814;
  --accent-hover: #f7ca00;
  --nav-bg: #ffffff;
  --nav-text: #0f1111;
  --nav-active: #e47911;
  --gap: 20px;
  --max-width: 1440px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--amz-font);
  background-color: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   HERO BANNER
   ========================================================= */
.hero-container {
  width: 100%;
  background: #111;
  overflow: hidden;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* =========================================================
   STICKY HEADER & NAVIGATION
   ========================================================= */
.header-sticky-wrapper {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.brand-logo-link {
  display: block;
  line-height: 0;
}

.brand-logo {
  height: auto;
  width: 75px;
  border-radius: 4px;
  object-fit: contain;
}

.brand-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}


.share-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  color: #565959;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.share-icon-btn:hover {
  color: #0f1111;
  background: #f0f2f2;
  border-color: #d5d9d9;
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.breadcrumbs .separator {
  color: #888;
  font-size: 0.7rem;
}

.breadcrumbs .current {
  color: #333;
  font-weight: 600;
}

/* =========================================================
   MAIN NAVIGATION & DROPDOWNS
   ========================================================= */
.main-nav {
  flex-grow: 1;
  display: flex;
  justify-content: flex-start;
  margin-left: 0;
}

.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 8px 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--nav-text);
  border-radius: 4px;
  transition: all 0.15s ease;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--link-hover);
  background-color: #f7f8f8;
}

.nav-item.active .nav-link {
  color: var(--nav-active);
}

.nav-item.active .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 14px;
  right: 14px;
  height: 3px;
  background-color: var(--nav-active);
  border-radius: 2px 2px 0 0;
}

.nav-link .caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #666;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.nav-item:hover .caret {
  transform: rotate(180deg);
  border-top-color: var(--link-hover);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 240px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  list-style: none;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1000;
  max-height: 420px;
  overflow-y: auto;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-main);
  white-space: nowrap;
}

.dropdown-item.active a,
.dropdown-item a:hover {
  background-color: #f0f2f2;
  color: var(--link-hover);
  font-weight: 600;
}

/* =========================================================
   SPECIAL BADGES
   ========================================================= */
.deal-pill {
  background-color: #cc0c39;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1.2;
  display: inline-block;
  margin-left: 2px;
  vertical-align: middle;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e7f4f5;
  color: #007185;
  border: 1px solid #c2e2e5;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* =========================================================
   HEADER ACTIONS
   ========================================================= */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.action-icon-btn {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333;
  transition: all 0.2s;
}

.action-icon-btn:hover {
  background: #f7fafa;
  border-color: #b0b4b4;
}

/* =========================================================
   SUBPAGE TITLE HEADER
   ========================================================= */
.page-title-section {
  max-width: var(--max-width);
  margin: 24px auto 0 auto;
  padding: 0 24px;
}

.page-title-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.page-heading {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
}

.page-subheading {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* =========================================================
   MAIN STORE CONTENT & GRID
   ========================================================= */
.store-main {
  max-width: var(--max-width);
  margin: 20px auto 40px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* EDITORIAL ROW GRID LAYOUTS */
.editorial-row {
  display: grid;
  gap: var(--gap);
  width: 100%;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-1 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.editorial-tile {
  display: block;
  background: var(--card-bg);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.editorial-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.editorial-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editorial-tile:hover img {
  filter: brightness(0.98);
}

/* =========================================================
   PRODUCT CARDS GRID
   ========================================================= */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  width: 100%;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-top-row {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

.product-img-wrapper {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.product-img-wrapper img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.05);
}

.product-meta {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-model-tag {
  display: inline-block;
  background: #232f3e;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  margin: 8px 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-title a:hover {
  color: var(--link-hover);
}

.product-upc {
  font-size: 0.85rem;
  font-weight: 600;
  color: #565959;
  letter-spacing: 0.3px;
  margin-top: 6px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.price-currency {
  font-size: 0.85rem;
  color: var(--text-main);
  position: relative;
  top: -6px;
  font-weight: 500;
}

.price-whole {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-main);
}

.price-fraction {
  font-size: 0.85rem;
  color: var(--text-main);
  position: relative;
  top: -6px;
  font-weight: 500;
}

.prime-badge {
  margin-left: 8px;
  color: #00a8e1;
  font-weight: 800;
  font-style: italic;
  font-size: 0.95rem;
}


/* =========================================================
   FITMENT COMPATIBILITY BOX
   ========================================================= */
.product-fitment-box {
  padding: 16px 20px;
  background: #fbfbfb;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.fitment-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
}

.fitment-header svg {
  color: #007185;
}

.fitment-list {
  font-size: 0.86rem;
  color: #333;
  line-height: 1.5;
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.fitment-highlight {
  font-weight: 600;
  color: var(--text-main);
}

.card-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.shop-product-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: var(--accent-color);
  border: 1px solid #fcd200;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f1111;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(213, 217, 217, 0.5);
  transition: background 0.2s;
}

.shop-product-btn:hover {
  background: var(--accent-hover);
}

/* =========================================================
   SHARE BAR
   ========================================================= */
.share-bar-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-top: 10px;
}

.share-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.share-circle-icon {
  width: 44px;
  height: 44px;
  background: #f0f2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.share-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.share-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--accent-color);
  border: 1px solid #fcd200;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f1111;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(213, 217, 217, 0.5);
  transition: background 0.2s;
}

.share-action-btn:hover {
  background: var(--accent-hover);
}

/* =========================================================
   STORE FOOTER (Amazon Brand Store + epauto.us Brand Info)
   ========================================================= */
.store-footer {
  background: #232f3e;
  color: #ffffff;
  margin-top: 40px;
  font-size: 0.85rem;
}

.back-to-top {
  background: #37475a;
  text-align: center;
  padding: 14px 0;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.back-to-top:hover {
  background: #485769;
}

.footer-main {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px 24px;
}

.footer-container {
  max-width: var(--max-width, 1440px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
}

.footer-col h3.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.footer-text {
  color: #cccccc;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.footer-social-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* epauto.us スタイルの正方形ソーシャルアイコン */
.footer-social-links a.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 0;
  background: #34495e;
  color: #ffffff;
  transition: all 0.2s ease;
  text-decoration: none;
}

.footer-social-links a.social:hover {
  transform: translateY(-2px);
}

.footer-social-links a.social-facebook:hover {
  background: #3b5998;
  color: #ffffff;
}

.footer-social-links a.social-amazon:hover {
  background: #ff9900;
  color: #ffffff;
}

.footer-social-links a.social-youtube:hover {
  background: #cc181e;
  color: #ffffff;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-menu li a {
  color: #cccccc;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s ease;
}

.footer-menu li a:hover {
  color: #e47911;
  text-decoration: underline;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #cccccc;
  margin: 0;
  line-height: 1.4;
}

.contact-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #e47911;
}

.contact-item a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.15s ease;
}

.contact-item a:hover {
  color: #e47911;
  text-decoration: underline;
}

.footer-bottom {
  max-width: var(--max-width, 1440px);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-bottom-links a {
  color: #cccccc;
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s ease;
}

.footer-bottom-links a:hover {
  color: #e47911;
  text-decoration: underline;
}

.footer-copyright {
  color: #999999;
  font-size: 0.78rem;
  line-height: 1.4;
}

/* =========================================================
   TOAST NOTIFICATION
   ========================================================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f1111;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================= */
@media (max-width: 1200px) {
  .header-content {
    flex-wrap: wrap;
    padding: 10px 16px;
    height: auto;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-top: 6px;
  }

  .nav-list {
    width: max-content;
  }
}

@media (max-width: 1080px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .header-content {
    gap: 12px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .product-top-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .share-bar-container {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .share-action-btn {
    width: 100%;
    justify-content: center;
  }

  .store-main {
    padding: 0 12px;
    gap: 14px;
  }
}