/* ============================================
   Siddhark Ecommerce — Responsive Styles
   ============================================ */

/* Tablet Landscape */
@media (max-width: 1100px) {
  .products__grid:not(.category-carousel__track) {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

/* Tablet Portrait */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero__desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__visual {
    height: 300px;
    max-width: 500px;
    margin: 0 auto;
  }

  .hero__title {
    font-size: 2.6rem;
  }

  .section__header--row {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

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

  .promo__desc {
    margin-left: auto;
    margin-right: auto;
  }

  .promo__timer {
    justify-content: center;
  }

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

  .newsletter__form {
    width: 100%;
    max-width: 480px;
  }

  .newsletter__form input {
    flex: 1;
    width: auto;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .testimonials__grid:not(.category-carousel__track) {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .top-bar__text {
    font-size: 0.72rem;
  }

  .top-bar__links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    padding: 100px 32px 32px;
    transition: right var(--transition);
    z-index: 999;
  }

  .nav.active {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav__item-row {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .nav__parent .nav__chevron {
    display: none;
  }

  .nav__submenu-btn {
    display: flex;
    flex-shrink: 0;
  }

  .nav__item--dropdown.is-open .nav__chevron {
    transform: rotate(180deg);
  }

  .nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 12px;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .nav__item--dropdown.is-open .nav__dropdown {
    max-height: 480px;
    padding-top: 4px;
    padding-bottom: 8px;
  }

  .nav__dropdown-link {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .nav__dropdown-link--all {
    border-top: none;
    margin-top: 0;
    padding-top: 12px;
  }

  .nav__link {
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .nav__parent {
    flex: 1;
  }

  .logo__text {
    display: none;
  }

  .header__inner {
    height: 70px;
  }

  .hero {
    padding: 60px 0 70px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__desc {
    font-size: 1rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .hero__stats {
    gap: 24px;
  }

  .stat strong {
    font-size: 1.4rem;
  }

  .hero__visual {
    display: none;
  }

  .section {
    padding: 60px 0;
  }

  .section__title {
    font-size: 1.8rem;
  }

  .products__grid:not(.category-carousel__track) {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .product-card__body {
    padding: 14px;
  }

  .product-card__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .product-card__footer .btn {
    width: 100%;
  }

  .product-card__wishlist {
    opacity: 1;
    transform: translateY(0);
  }

  .categories__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .categories__grid:not(.category-carousel__track) .category-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
  }

  .categories__grid:not(.category-carousel__track) .category-card__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .categories__grid:not(.category-carousel__track) .category-card h3 {
    margin-bottom: 2px;
  }

  .categories__grid:not(.category-carousel__track) .category-card p {
    margin-bottom: 0;
  }

  .categories__grid:not(.category-carousel__track) .category-card__cta {
    display: none;
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
    padding: 24px;
  }

  .feature-card__icon {
    margin: 0;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
  }

  .promo__title {
    font-size: 1.5rem;
  }

  .timer-block {
    padding: 12px 14px;
    min-width: 64px;
  }

  .timer-value {
    font-size: 1.5rem;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .footer__payments {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__title {
    font-size: 1.7rem;
  }

  .hero__badge {
    font-size: 0.7rem;
    padding: 5px 12px;
  }

  .hero__stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .stat {
    flex: 1;
    min-width: 80px;
  }

  .products__grid:not(.category-carousel__track) {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }

  .promo__timer {
    gap: 8px;
  }

  .timer-block {
    padding: 10px;
    min-width: 56px;
  }

  .timer-value {
    font-size: 1.2rem;
  }

  .newsletter__form {
    flex-direction: column;
  }

  .newsletter__form input {
    width: 100%;
  }

  .newsletter__form .btn {
    width: 100%;
  }

  .testimonial-card {
    padding: 24px;
  }
}

/* ---- Shop, Product & Cart Pages ---- */
@media (max-width: 1100px) {
  .shop__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .shop__sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    z-index: 1001;
    overflow-y: auto;
    transition: left var(--transition);
    border-radius: 0;
    top: 0;
  }

  .shop__sidebar.active {
    left: 0;
    box-shadow: var(--shadow-lg);
  }

  .filter-toggle {
    display: flex;
  }

  .product-detail__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-gallery {
    position: static;
  }

  .product-info__title {
    font-size: 1.6rem;
  }

  .product-info__specs ul,
  .product-about__specs ul {
    grid-template-columns: 1fr;
  }

  .product-about__content {
    padding: 24px 20px;
  }

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

  .cart__summary {
    position: static;
  }

  .cart__header {
    display: none;
  }

  .cart-item {
    grid-template-columns: 1fr;
    gap: 12px;
    position: relative;
    padding: 20px;
  }

  .cart-item__product {
    padding-right: 40px;
  }

  .cart-item__remove {
    position: absolute;
    top: 20px;
    right: 20px;
  }

  .cart-item__price::before {
    content: 'Price: ';
    font-weight: 400;
    color: var(--text-light);
  }

  .cart-item__total::before {
    content: 'Total: ';
    font-weight: 400;
    color: var(--text-light);
  }
}

@media (max-width: 768px) {
  .page-header__title {
    font-size: 1.6rem;
  }

  .shop__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .wishlist__grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
    margin: 0;
  }

  .related-products .products__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .product-info__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .product-info__actions .btn--primary,
  .product-info__actions .btn--outline {
    width: 100%;
  }

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

  .checkout-summary {
    position: static;
    order: -1;
  }

  .checkout-steps {
    flex-wrap: wrap;
    gap: 8px;
  }

  .checkout-step:not(:last-child)::after {
    display: none;
  }

  .about-intro__grid,
  .about-mission__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-intro__visual {
    order: -1;
  }

  .about-logo {
    width: 200px;
    height: 200px;
  }

  .about-stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

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

  .franchise-intro__inner,
  .franchise-enquiry__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .franchise-card--featured {
    transform: none;
  }

  .franchise-card--featured:hover {
    transform: translateY(-6px);
  }

  .franchise-perks__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-stat strong {
    font-size: 2rem;
  }

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

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

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

  .return-request-form__fields {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .return-request-card__header,
  .return-request-card__body {
    padding: 24px;
  }

  .return-request-form__actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 28px;
    padding-top: 24px;
  }

  .return-request-form__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .success-card {
    padding: 32px 24px;
  }

  .success-card__actions {
    max-width: none;
  }

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

  .auth-page__brand {
    padding: 40px 24px;
    min-height: auto;
  }

  .auth-brand img {
    width: 100px;
    height: 100px;
  }

  .auth-brand strong {
    font-size: 1.5rem;
  }

  .auth-card {
    padding: 32px 24px;
  }

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

  .account-sidebar {
    position: static;
  }

  .account-nav {
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
    padding: 8px;
  }

  .account-nav__item {
    flex: 1;
    min-width: fit-content;
    justify-content: center;
    font-size: 0.82rem;
    padding: 10px 12px;
  }

  .account-nav__item span {
    display: none;
  }

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

@media (max-width: 480px) {
  .about-stats__grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-intro__content h2 {
    font-size: 1.6rem;
  }

  .team__grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }

  .franchise-pricing {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
  }

  .franchise-intro__content h2 {
    font-size: 1.6rem;
  }

  .checkout-step {
    padding: 0 12px;
    font-size: 0.78rem;
  }

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

  .order-detail__sidebar {
    position: static;
  }

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

  .blog-post__content {
    padding: 24px 20px;
  }

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

  .blog-post__nav-link--next {
    text-align: left;
  }

  .blog-post__author {
    flex-direction: column;
    text-align: center;
  }

  .blog-cta__inner h2 {
    font-size: 1.4rem;
  }

  .tracking-form {
    flex-direction: column;
  }

  .error-page__code {
    font-size: 5rem;
  }

  .legal-content {
    padding: 24px;
  }
}

@media (max-width: 1100px) {
  .blog-post-layout__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .blog-post-sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Nav overlay backdrop */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 480px) {
  .lead-popup__body {
    padding: 28px 20px 20px;
  }

  .lead-popup__dialog {
    border-radius: var(--radius-md);
  }

  .lead-popup__header h2 {
    font-size: 1.25rem;
  }
}
