/* ==========================================================================
   PC BYTES - Responsive Styles
   Media queries for mobile, tablet, and desktop breakpoints
   ========================================================================== */

/* -----------------------------------------------------------------------
   Large Desktop (max-width: 1200px)
   ----------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .container {
    padding-left: var(--space-2xl);
    padding-right: var(--space-2xl);
  }

  .footer__top {
    padding-left: var(--space-2xl);
    padding-right: var(--space-2xl);
  }

  .footer__bottom {
    padding-left: var(--space-2xl);
    padding-right: var(--space-2xl);
  }

  .account__layout {
    padding-left: var(--space-2xl);
    padding-right: var(--space-2xl);
  }
}

/* -----------------------------------------------------------------------
   Tablet (max-width: 992px)
   ----------------------------------------------------------------------- */
@media (max-width: 992px) {
  /* Hide desktop nav, show mobile button */
  .navbar__menu {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* Builder layout stack */
  .builder__layout {
    grid-template-columns: 1fr;
  }

  .builder__visual {
    order: -1;
  }

  .builder-cta {
    flex-direction: column;
    text-align: center;
  }

  /* About layout stack */
  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__image-box {
    order: -1;
  }

  /* Contact layout stack */
  .contact__grid {
    grid-template-columns: 1fr;
  }

  /* Footer 2x2 grid */
  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  /* Account layout stack */
  .account__layout {
    grid-template-columns: 1fr;
  }

  .account__sidebar {
    position: static;
  }

  .account__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .account__link {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Hero adjustments */
  .hero {
    height: 500px;
  }

  .hero__content {
    padding: 100px var(--space-2xl) 60px;
  }

  .hero__prev,
  .hero__next {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  /* Stats */
  .stats-banner {
    gap: var(--space-lg);
  }

  .stats-banner__divider {
    display: none;
  }
}

/* -----------------------------------------------------------------------
   Mobile (max-width: 768px)
   ----------------------------------------------------------------------- */
@media (max-width: 768px) {
  .container {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  /* Hero */
  .hero {
    height: 420px;
  }

  .hero__content {
    padding: 90px var(--space-lg) 50px;
  }

  .hero__prev,
  .hero__next {
    display: none;
  }

  /* Grids single column */
  .grid--products {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

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

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

  /* Forms */
  .form-row-2 {
    grid-template-columns: 1fr;
  }

  /* Footer stack */
  .footer__top {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  /* Flash deals */
  .flash-deals__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .countdown__value {
    font-size: 22px;
    padding: 6px 10px;
    min-width: 44px;
  }

  /* About stats */
  .about__stats {
    grid-template-columns: 1fr;
  }

  /* Account stats */
  .account__stats-grid {
    grid-template-columns: 1fr;
  }

  /* Shop toolbar */
  .shop__toolbar {
    flex-direction: column;
  }

  /* Navbar search bar */
  .navbar__search-bar {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  /* Account layout */
  .account__layout {
    padding: var(--space-lg);
  }
}

/* -----------------------------------------------------------------------
   Small Mobile (max-width: 576px)
   ----------------------------------------------------------------------- */
@media (max-width: 576px) {
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  /* Hero */
  .hero {
    height: 360px;
  }

  .hero__content {
    padding: 80px var(--space-md) 40px;
  }

  .hero__title {
    font-size: clamp(26px, 8vw, 36px);
    margin-bottom: 12px;
  }

  .hero__subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .hero__buttons {
    flex-direction: column;
    gap: 10px;
  }

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

  /* Dots at bottom conflict with the stacked CTA buttons. Move to the top-right corner. */
  .hero__dots {
    top: 20px;
    bottom: auto;
    left: auto;
    right: 16px;
    transform: none;
    gap: 6px;
  }
  .hero__dot {
    width: 8px;
    height: 8px;
  }

  /* Grid columns */
  .grid--products {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .grid--categories {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  /* Product cards: image was a fixed 300px tall — distorts badly in narrow 2-col grid */
  .product-card__image {
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .product-card__body {
    padding: 10px;
  }
  .product-card__name {
    font-size: 13px;
    line-height: 1.3;
  }
  .product-card__price {
    font-size: 15px;
  }
  .product-card__btn {
    padding: 8px 10px;
    font-size: 11px;
  }

  /* Section heading: clamp already responsive but reduce bottom margin so cards lift */
  .section-title {
    font-size: clamp(22px, 6vw, 32px);
  }
  .section-label {
    letter-spacing: 1.5px;
    font-size: 11px;
  }

  /* Flash deals header: stack title above timer, shrink timer */
  .flash-deals__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  .flash-deals__timer {
    width: 100%;
    justify-content: flex-start;
  }

  /* Stats banner items shouldn't have huge per-item side padding when stacked */
  .stats-banner__item {
    padding: 0;
  }
  .stats-banner__divider {
    display: none;
  }

  /* Bestselling carousel cards keep a sane width on mobile */
  .bestselling-carousel__track .product-card {
    flex: 0 0 70vw;
    max-width: 280px;
  }

  /* Builder budget chips */
  .builder__budget-chips {
    flex-direction: column;
  }

  .builder__budget-chips .filter-chip {
    width: 100%;
    text-align: center;
  }

  /* Stats banner */
  .stats-banner {
    flex-direction: column;
    gap: var(--space-md);
  }

  /* Account */
  .account__layout {
    padding: var(--space-sm);
  }

  .account__card {
    padding: var(--space-md);
  }

  /* Footer */
  .footer__top,
  .footer__bottom {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  /* Countdown */
  .countdown__value {
    font-size: 18px;
    padding: 4px 8px;
    min-width: 38px;
  }

  .countdown__separator {
    font-size: 18px;
  }
}
