/* =============================================================
   Yassir Gaming - Responsive Overrides
   Breakpoints: mobile <768px, tablet 768-1024px, desktop >1024px
   ============================================================= */

/* =============================================================
   MOBILE (<768px)
   ============================================================= */
@media (max-width: 767px) {

  /* --- Shell: Navbar --- */
  .store-nav .nav-inner {
    padding: 10px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .store-nav .search-form {
    order: 3;
    max-width: 100%;
    width: 100%;
    flex-basis: 100%;
  }
  .store-nav .search-container {
    order: 3;
    max-width: 100%;
    width: 100%;
    flex-basis: 100%;
  }
  .store-nav .nav-links {
    display: none;
  }
  .store-nav .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 26, 0.97);
    z-index: 200;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }
  .store-nav .nav-links.open .nav-link {
    font-size: 1.25rem;
    padding: 12px 32px;
  }
  .store-nav .hamburger {
    display: flex;
  }
  .store-nav .close-menu {
    display: block;
  }
  .store-nav .logo .logo-text {
    font-size: 1.1rem;
  }
  .store-nav .logo-img {
    height: 28px;
  }

  /* --- Shell: Content --- */
  .store-content {
    padding: 16px;
  }

  /* --- Shell: Footer --- */
  .store-footer .footer-inner {
    flex-direction: column;
    gap: 24px;
    padding: 24px 16px;
  }
  .store-footer .footer-col {
    flex-basis: 100%;
    min-width: 100%;
  }
  .store-footer .footer-bottom {
    padding: 16px;
    text-align: center;
  }

  /* --- Search Autocomplete --- */
  .search-dropdown {
    max-height: 60vh;
  }
  .search-result-item .result-name {
    font-size: 0.8rem;
  }

  /* --- HomePage --- */
  .home-page .hero {
    padding: 24px 0;
  }
  .home-page .hero-content h1 {
    font-size: 1.75rem;
  }
  .home-page .hero-sub {
    font-size: 0.9rem;
  }
  .home-page .hero-btn {
    padding: 10px 24px;
    font-size: 0.95rem;
  }
  .home-page .hero-banners {
    flex-direction: column;
  }
  .home-page .banner-card {
    flex: 1 0 auto;
    min-width: 100%;
    height: 160px;
  }
  .home-page .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .home-page .product-card .product-info {
    padding: 10px;
  }
  .home-page .product-name {
    font-size: 0.85rem;
  }
  .home-page .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .home-page .platform-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .home-page .section-block {
    margin-bottom: 24px;
  }
  .home-page .section-header {
    margin-bottom: 12px;
  }
  .home-page .section-header h2 {
    font-size: 1.25rem;
  }

  /* --- CatalogPage --- */
  .catalog-page .page-title {
    font-size: 1.5rem;
  }
  .catalog-layout {
    flex-direction: column;
    gap: 16px;
  }
  .filters-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    flex-shrink: 1 !important;
  }
  .catalog-page .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .catalog-content .results-info {
    font-size: 0.85rem;
  }
  .pagination {
    gap: 4px;
  }
  .pagination .page-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  /* --- ProductDetailPage --- */
  .detail-layout {
    flex-direction: column;
    gap: 24px;
  }
  .detail-image {
    width: 100% !important;
    min-width: 100% !important;
    flex-shrink: 1 !important;
  }
  .detail-image .cover-image,
  .detail-image .cover-placeholder {
    max-height: 300px;
    object-fit: contain;
  }
  .detail-info h1 {
    font-size: 1.5rem;
  }
  .meta-row {
    gap: 8px;
  }
  .meta-item {
    flex: 1 0 45%;
  }
  .purchase-section {
    padding: 16px;
  }
  .purchase-section .cart-actions {
    flex-direction: column;
    gap: 12px;
  }
  .purchase-section .qty-control {
    align-self: flex-start;
  }
  .purchase-section .add-to-cart {
    width: 100%;
  }
  .price-amount {
    font-size: 1.75rem;
  }
  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .sys-reqs {
    flex-direction: column;
  }
  .sys-req-block {
    flex-basis: 100%;
    min-width: 100%;
  }
  .lang-list {
    gap: 6px;
  }
  .lang-tag {
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  /* --- Lightbox on mobile --- */
  .lightbox-arrow {
    font-size: 2rem !important;
    padding: 12px !important;
  }
  .lightbox-prev { left: 5px !important; }
  .lightbox-next { right: 5px !important; }
  .lightbox-close {
    top: 12px !important;
    right: 12px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 1.5rem !important;
  }
  .lightbox-counter {
    top: 16px !important;
    font-size: 0.8rem !important;
  }
  .lightbox-image {
    max-width: 95vw !important;
    max-height: 80vh !important;
  }
  .lightbox-image img {
    max-width: 95vw !important;
    max-height: 80vh !important;
  }

  /* --- CartPage --- */
  .cart-page {
    max-width: 100%;
  }
  .cart-page .page-title {
    font-size: 1.5rem;
  }
  .cart-layout {
    flex-direction: column;
    gap: 16px;
  }
  .cart-summary {
    width: 100% !important;
    min-width: 100% !important;
    position: static !important;
  }
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .cart-item .item-info {
    width: 100%;
  }
  .cart-item .item-actions {
    width: 100%;
    justify-content: space-between;
  }
  .cart-item .item-details h4 {
    font-size: 0.9rem;
  }
  .cart-item .item-thumb {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
  }

  /* --- LoginPage --- */
  .login-page {
    padding: 16px;
    min-height: 50vh;
  }
  .login-card {
    padding: 24px 20px;
  }
  .login-card h2 {
    font-size: 1.5rem;
  }
  .login-links {
    flex-direction: column;
    gap: 8px;
  }

  /* --- ProfilePage --- */
  .profile-page {
    max-width: 100%;
    padding: 0 16px;
  }
  .profile-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .profile-actions {
    flex-direction: column;
    gap: 8px;
  }
  .profile-actions .action-btn {
    width: 100%;
    text-align: center;
  }
  .info-item {
    flex-direction: column;
    gap: 4px;
  }

  /* --- OrdersPage --- */
  .orders-page {
    max-width: 100%;
    padding: 0 16px;
  }
  .orders-page .page-title {
    font-size: 1.5rem;
  }
  .order-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }
  .order-right {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .order-meta {
    gap: 4px;
  }
  .order-item {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 4px;
  }
  .order-items .item-qty {
    margin: 0;
  }
  .order-items .item-left {
    width: 100%;
  }
  .order-keys .key-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .order-keys .key-serial {
    font-size: 0.75rem;
    word-break: break-all;
  }
  .key-group {
    margin-bottom: 8px;
  }
}

/* =============================================================
   TABLET (768px - 1024px)
   ============================================================= */
@media (min-width: 768px) and (max-width: 1024px) {

  /* --- Shell: Navbar --- */
  .store-nav .nav-inner {
    padding: 12px 20px;
    gap: 16px;
  }
  .store-nav .search-form {
    max-width: 300px;
  }
  .store-nav .search-container {
    max-width: 300px;
  }
  .store-nav .nav-link {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
  .store-nav .hamburger {
    display: none;
  }

  /* --- Shell: Content --- */
  .store-content {
    padding: 20px;
  }

  /* --- Shell: Footer --- */
  .store-footer .footer-inner {
    padding: 32px 20px;
  }
  .store-footer .footer-col {
    flex: 1 0 180px;
  }

  /* --- HomePage --- */
  .home-page .hero-content h1 {
    font-size: 2.25rem;
  }
  .home-page .hero-banners {
    gap: 12px;
  }
  .home-page .banner-card {
    flex: 1 0 220px;
    height: 180px;
  }
  .home-page .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
  .home-page .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  /* --- CatalogPage --- */
  .filters-sidebar {
    width: 220px !important;
    min-width: 220px !important;
  }
  .catalog-layout {
    gap: 24px;
  }
  .catalog-page .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  /* --- ProductDetailPage --- */
  .detail-image {
    width: 300px !important;
    min-width: 300px !important;
  }
  .detail-layout {
    gap: 28px;
  }
  .screenshots-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  /* --- CartPage --- */
  .cart-page {
    max-width: 100%;
  }
  .cart-summary {
    width: 260px !important;
    min-width: 260px !important;
  }

  /* --- OrdersPage --- */
  .orders-page {
    max-width: 100%;
    padding: 0 20px;
  }
}

/* =============================================================
   Hamburger Menu Button (hidden on desktop/tablet)
   ============================================================= */
.store-nav .hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid #2a2a4a;
  border-radius: 6px;
  color: #f1f5f9;
  padding: 6px 10px;
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
}
.store-nav .hamburger:hover {
  background: #1a1a3e;
}

/* Close button inside the mobile menu overlay */
.store-nav .close-menu {
  display: none;
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #f1f5f9;
  font-size: 2rem;
  cursor: pointer;
}

/* =============================================================
   Touch-friendly improvements for all small screens
   ============================================================= */
@media (hover: none) and (pointer: coarse) {
  .product-card:hover {
    transform: none;
    border-color: #2a2a4a;
  }
  .screenshot:hover {
    transform: none;
  }
  .lightbox-arrow {
    background: rgba(255,255,255,0.15) !important;
  }
}
