/* Bootstrap handles layout; this file keeps only Apple-specific behavior/assets. */
body {
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

#apple-nav {
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.mega-menu {
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

#apple-nav {
  height: 44px;
  z-index: 9999;
}

#apple-nav .nav-inner,
.mega-inner {
  max-width: 1024px;
}

.nav-link-top {
  height: 100%;
  padding: 0 10px;
  display: flex;
  align-items: center;
  color: rgba(29, 29, 31, .82);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s;
}

.nav-link-top:hover {
  color: #000;
}

.apple-logo {
  font-size: 18px;
}

.mega-menu {
  position: fixed;
  top: 44px;
  left: 0;
  width: 100%;
  padding: 28px 0 22px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s, visibility .22s;
  z-index: 9998;
}

.mega-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  width: 100%;
  height: 8px;
}

.nav-item-wrap:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mega-inner {
  gap: 48px;
}

.mega-col h6,
#mob-sub-links h6 {
  color: #6e6e73;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.mega-col h6 {
  margin-bottom: 10px;
}

#mob-sub-links h6 {
  margin: 18px 0 4px;
}

.mega-col a,
#mob-sub-links a {
  display: block;
  color: rgba(29, 29, 31, .82);
}

.mega-col a {
  font-size: 13px;
  line-height: 2;
}

.mega-col a:hover,
.mob-item:hover,
#mob-sub-links a:hover {
  color: #2997ff !important;
}

#page-content {
  transition: filter .25s;
}

#apple-nav:hover~#page-content {
  filter: blur(3px) brightness(.7);
}

#mob-hamburger {
  height: 44px;
  padding: 0 10px;
  color: rgba(29, 29, 31, .82);
  font-size: 20px;
}

#mob-drawer,
#mob-sub {
  background: rgba(255, 255, 255, .97);
  transform: translateX(100%);
}

#mob-drawer {
  z-index: 99999;
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}

#mob-sub {
  padding: 0 28px 28px;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

#mob-drawer.open,
#mob-sub.open {
  transform: translateX(0);
}

#mob-close {
  top: 10px;
  right: 18px;
  z-index: 2;
  font-size: 24px;
}

#mob-main-list {
  padding: 60px 28px 28px;
}

.mob-item {
  border-color: rgba(0, 0, 0, .1) !important;
  color: rgba(29, 29, 31, .86) !important;
  font-size: 17px;
  cursor: pointer;
}

.mob-chevron {
  color: #6e6e73;
  font-size: 14px;
}

#mob-back {
  padding: 16px 0 10px;
  font-size: 15px;
  text-decoration: none;
}

#mob-sub-title {
  color: #1d1d1f !important;
  font-size: 22px;
  margin-bottom: 20px;
}

#mob-sub-links a {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  font-size: 15px;
}

#mob-close {
  color: #1d1d1f !important;
}

.product-section {
  padding: 80px 20px 50px;
}

.product-section.hero-full,
.bg-light-gray {
  background-color: #f5f5f7;
}

.product-title {
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: -.02em;
}

.product-cell .product-title {
  font-size: clamp(28px, 3.6vw, 50px);
}

.airpods-title {
  font-size: clamp(22px, 3.5vw, 48px);
}

.product-sub {
  font-size: clamp(14px, 2vw, 21px);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: .04em;
}

.hero-watch-logo {
  width: min(100%, 320px);
}

.cell-logo {
  width: min(100%, 230px);
}

.image-icon {
  width: min(100%, 330px);
}

.product-row {
  max-width: 1900px;
  --bs-gutter-x: 20px;
  --bs-gutter-y: 20px;
}

.product-cell,
.hero-iphone,
.hero-watch,
.hero-macbook {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.product-cell {
  min-height: 680px;
  padding: 45px 20px 0;
  background-image: var(--bg);
}

.hero-iphone {
  height: 42rem;
  background-image: url("../images/top_iphone.jpg");
}

.hero-watch {
  height: 36.25rem;
  padding: 65px 20px;
  background-image: url("../images/10002.jpg");
}

.hero-macbook {
  height: 52rem;
  background-color: #fff;
  background-image: url("../images/hero_macbook_neo.jpg");
}

.cell-ipad {
  --bg: url("../images/promo_ipad_air.jpg");
}

.cell-macbook-pro {
  --bg: url("../images/dark_pc.jpg");
}

.cell-airpods {
  --bg: url("../images/airpodspro_3.jpg");
}

.cell-business {
  --bg: url("../images/apple_business.jpg");
  background-color: #f0f0f5;
  background-size: initial;
}

.cell-tradein {
  --bg: url("../images/iphone_tradein.jpg");
  background-color: #fafafa;
  background-size: initial;
}

.cell-card {
  --bg: url("../images/apple_card.jpg");
  background-color: #fff;
}

.bg-sky {
  background-color: #daeaf6;
}

.bg-dark .product-sub {
  color: #a1a1a6;
}

#entertainment {
  padding: 64px 0 28px;
}

#entertainment h2 {
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -.02em;
}

/* ===================================================================
  ENDLESS ENTERTAINMENT CAROUSEL CSS

  Previous custom version:
    .scroll-track was the real scrolling container. It used horizontal
    overflow, scroll snapping, smooth scrolling, and JavaScript scrollBy().

  Bootstrap version used now:
    .carousel, .carousel-inner, and .carousel-item come from Bootstrap.
    Bootstrap controls which slide is active and moves the carousel.
    Bootstrap utilities in the HTML now handle the row layout:
    d-flex, overflow-x-auto, gap-2, px-3, px-md-4, and pb-3.
    The custom CSS below only preserves the Apple-like card details:
    card width, card height, overlays, text position, and CTA sizing.

  Difference:
    Bootstrap = component behavior.
    Bootstrap utilities = scrollable flex row layout.
    Custom CSS = exact visual details Bootstrap does not provide.

  User scrolling:
    overflow-x-auto is on .entertainment-carousel-row, not .carousel-inner.
    That lets users scroll the card row without trapping normal vertical page
    scrolling when the cursor is over the section.
=================================================================== */
.entertainment-carousel {
  overflow: hidden;
}

.entertainment-carousel .carousel-inner {
  overflow: hidden;
}

.entertainment-carousel .carousel-item {
  transition: transform .6s ease-in-out;
}

.entertainment-carousel-row {
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.entertainment-carousel-row::-webkit-scrollbar {
  height: 8px;
}

.entertainment-carousel-row::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .24);
  border-radius: 999px;
}

.entertainment-carousel-row::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-card-lg,
.scroll-card-sm {
  scroll-snap-align: start;
  cursor: pointer;
}

.scroll-card-lg {
  flex: 0 0 min(86vw, 1260px);
  height: 670px;
}

.scroll-card-sm {
  flex: 0 0 260px;
  height: 190px;
}

.scroll-card-lg img,
.scroll-card-sm img {
  object-fit: cover;
  object-position: center top;
}

.scroll-card-lg img {
  object-fit: contain;
  background: #000;
}

.scroll-card-lg::after,
.scroll-card-sm::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .58));
  pointer-events: none;
}

.card-badge {
  top: 12px;
  right: 14px;
  z-index: 1;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .4);
  font-size: 11px;
  letter-spacing: .04em;
}

.card-info {
  bottom: 12px;
  left: 14px;
  z-index: 1;
}

.card-info p {
  margin: 0;
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
}

.card-title {
  max-width: 360px;
  font-size: 22px;
  line-height: 1.12;
}

.card-cta {
  margin-top: 6px;
  padding: 5px 14px;
  font-size: 12px;
}

.scroll-card-sm .card-badge {
  font-size: 9px;
}

.scroll-card-sm .card-info {
  right: 12px;
}

.scroll-card-sm .card-title {
  max-width: 200px;
  font-size: 11px;
  line-height: 1.2;
}

.scroll-card-sm .card-cta {
  font-size: 11px;
}

#footer {
  background: #f5f5f7;
  color: #86868b;
  font-size: 11px;
}

.apple-footer-container {
  max-width: 980px;
}

.disclaimer {
  line-height: 1.35;
}

.disclaimer p {
  margin: 0 0 9px;
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

.disclaimer-lead {
  grid-template-columns: 16px 1fr;
  column-gap: 4px;
}

.footer-col h6 {
  margin: 16px 0 9px;
  color: #1d1d1f;
  font-size: 11px;
  font-weight: 600;
}

.footer-col>.footer-group:first-child h6 {
  margin-top: 0;
}

.footer-heading {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 0;
}

.footer-panel {
  display: block;
}

.footer-col a {
  display: block;
  color: #515154;
  font-size: 11px;
  line-height: 1.9;
}

#footer a:hover {
  text-decoration: underline;
}

.more-ways-wrapper {
  color: #6e6e73;
  font-size: 12px;
  line-height: 1.45;
}

.more-ways-wrapper a {
  color: #0066cc;
}

.footer-bottom,
.footer-bottom a,
.footer-bottom span {
  color: #6e6e73;
  font-size: 11px;
}

.footer-bottom-links a+a,
.footer-bottom-links span+a,
.footer-bottom-links a+span {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid #d2d2d7;
}

@media (max-width: 767px) {
  .product-row {
    --bs-gutter-x: 12px;
    --bs-gutter-y: 12px;
  }

  .product-cell {
    min-height: 520px;
    padding-top: 38px;
  }

  .product-section.hero-full {
    height: 620px;
    padding-top: 42px;
  }

  .scroll-card-lg {
    flex-basis: 88vw;
    height: 66vh;
    min-height: 450px;
  }

  .scroll-card-sm {
    flex-basis: 180px;
    height: 140px;
  }

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

  #apple-nav:hover~#page-content {
    filter: none;
  }

  #footer {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .apple-footer-container {
    max-width: 100%;
  }

  .disclaimer {
    margin-bottom: 0 !important;
    padding-bottom: 24px !important;
    font-size: 12px;
    line-height: 1.35;
  }

  .footer-links-wrapper {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    display: block;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .footer-col {
    width: 100%;
    max-width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .footer-col h6,
  .footer-col>.footer-group:first-child h6 {
    margin: 0;
  }

  .footer-group {
    border-bottom: 1px solid #d2d2d7;
  }

  .footer-heading {
    position: relative;
    min-height: 46px;
    padding: 0 28px 0 0;
    color: #1d1d1f;
    font-size: 12px;
    font-weight: 400;
    line-height: 46px;
    cursor: pointer;
  }

  .footer-heading::after {
    content: "\F282";
    position: absolute;
    right: 1px;
    top: 50%;
    color: #1d1d1f;
    font-family: "bootstrap-icons";
    font-size: 14px;
    line-height: 1;
    transform: translateY(-50%);
    transition: transform .2s ease;
  }

  .footer-group.open .footer-heading::after {
    transform: translateY(-50%) rotate(180deg);
  }

  .footer-panel {
    display: none;
    padding: 0 0 13px 14px;
  }

  .footer-group.open .footer-panel {
    display: block;
  }

  .footer-col a {
    font-size: 12px;
    line-height: 2;
  }

  .more-ways-wrapper {
    padding-top: 22px !important;
    padding-bottom: 14px !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    font-size: 12px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px !important;
    padding-top: 8px !important;
  }

  .footer-locale {
    order: 1;
  }

  .footer-copyright {
    order: 2;
  }

  .footer-bottom-links {
    order: 3;
  }

  .footer-bottom-links a+a {
    margin-left: 10px;
    padding-left: 10px;
  }
}
