/* ========================================
   PCShop Responsive Design
   Breakpoints: 1200px | 960px | 768px | 480px | 360px
   ======================================== */

/* Hide admin bar globally */
#wpadminbar {
  display: none !important;
}
html {
  margin-top: 0 !important;
}

/* ========================================
   MOBILE NAVIGATION DRAWER
   ======================================== */
.pcshop-mobile-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 300px;
  height: 100vh;
  height: 100dvh;
  background: #1a1a2e;
  z-index: 9999;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  will-change: transform;
}
.pcshop-mobile-drawer.open {
  left: 0;
}
.pcshop-mobile-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #1a1a2e;
  z-index: 1;
}
.pcshop-mobile-drawer-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.pcshop-mobile-drawer-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}
.pcshop-mobile-drawer-close:hover {
  background: rgba(255,255,255,0.1);
}
.pcshop-mobile-drawer-body {
  padding: 8px 0;
}
.pcshop-mobile-drawer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pcshop-mobile-drawer-menu li a {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.85);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: all 0.2s;
  text-decoration: none;
}
.pcshop-mobile-drawer-menu li a:hover,
.pcshop-mobile-drawer-menu li a.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
  padding-left: 28px;
}
.pcshop-mobile-drawer-menu li a.active {
  border-left: 3px solid var(--pcshop-primary, #4f46e5);
}
.pcshop-mobile-drawer-links {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 8px;
}
.pcshop-mobile-drawer-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.7);
  padding: 12px 0;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.pcshop-mobile-drawer-links a:last-child {
  border-bottom: none;
}
.pcshop-mobile-drawer-links a:hover {
  color: #fff;
}
.pcshop-mobile-drawer-links a svg {
  opacity: 0.6;
}
.pcshop-mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  animation: fadeIn 0.2s ease;
}
body.mobile-drawer-open {
  overflow: hidden;
}

/* ========================================
   HAMBURGER BUTTON
   ======================================== */
.pcshop-mobile-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--pcshop-text, #1e293b);
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.pcshop-mobile-nav-toggle:hover {
  background: rgba(0,0,0,0.05);
}

/* ========================================
   1200px - Large tablets / small desktops
   ======================================== */
@media (max-width: 1200px) {
  .pcshop-products-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .pcshop-flash-products {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .pcshop-categories-grid,
  .pcshop-categories-grid-5 {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .pcshop-footer-top {
    grid-template-columns: 1.2fr 1fr 1fr 1fr !important;
  }
  .pcshop-pd-related-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ========================================
   960px - Tablets landscape
   ======================================== */
@media (max-width: 960px) {
  .pcshop-header-main {
    gap: 12px;
  }

  .pcshop-hero-sidebar {
    display: none !important;
  }
  .pcshop-hero-layout {
    flex-direction: column;
  }

  .pcshop-products-grid,
  .pcshop-flash-products {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .pcshop-categories-grid,
  .pcshop-categories-grid-5 {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .pcshop-pd-grid {
    grid-template-columns: 1fr !important;
  }

  .pcshop-pd-gallery {
    max-width: 500px;
    margin: 0 auto;
  }

  .pcshop-shop-layout {
    grid-template-columns: 1fr !important;
  }
  .pcshop-shop-sidebar {
    order: 1;
    position: static !important;
  }

  .pcshop-cart-layout {
    grid-template-columns: 1fr !important;
  }
  .pcshop-cart-summary {
    order: -1;
  }

  .pcshop-checkout-layout {
    grid-template-columns: 1fr !important;
  }
  .pcshop-checkout-sidebar {
    order: -1;
  }

  .pcshop-footer-top {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .pcshop-pd-related-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

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

  .pcshop-pd-trust {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ========================================
   768px - Tablets portrait / large phones
   ======================================== */
/* ========================================
   NAV TICKER (all screen sizes)
   ======================================== */
.pcshop-nav-fixed {
  display: flex;
  flex-shrink: 0;
  gap: 0;
}

.pcshop-nav-fixed .pcshop-nav-link {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pcshop-dark);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  height: 42px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.pcshop-nav-fixed .pcshop-nav-link:hover,
.pcshop-nav-fixed .pcshop-nav-link.active {
  color: var(--pcshop-primary);
}

.pcshop-nav-scroll-wrap {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  height: 42px;
}

.pcshop-nav-links a {
  flex-shrink: 0;
  height: 42px;
  box-sizing: border-box;
}

.pcshop-nav-fade-top,
.pcshop-nav-fade-bottom {
  display: none !important;
}

.pcshop-nav-fade-left,
.pcshop-nav-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pcshop-ticker-active .pcshop-nav-fade-left,
.pcshop-ticker-active .pcshop-nav-fade-right {
  opacity: 1;
}

.pcshop-nav-fade-left {
  left: 0;
  background: linear-gradient(to right, var(--pcshop-white, #fff) 0%, transparent 100%);
}

.pcshop-nav-fade-right {
  right: 0;
  background: linear-gradient(to left, var(--pcshop-white, #fff) 0%, transparent 100%);
}

@keyframes pcshopNavTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.pcshop-ticker-active .pcshop-nav-links {
  display: flex !important;
  flex-direction: row;
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  animation: pcshopNavTickerScroll 30s linear infinite;
}

.pcshop-ticker-active .pcshop-nav-links a {
  padding: 10px 12px;
  font-size: 13px;
}

.pcshop-nav-scroll-wrap:hover .pcshop-nav-links {
  animation-play-state: paused;
}

@media (max-width: 768px) {
  /* --- Hide on mobile --- */
  .pcshop-hide-on-mobile {
    display: none !important;
  }

  /* --- Show hamburger, hide desktop nav --- */
  .pcshop-mobile-nav-toggle {
    display: flex;
  }

  .pcshop-nav-links::-webkit-scrollbar {
    display: none;
  }

  .pcshop-nav-links a {
    padding: 10px 12px;
    font-size: 12px;
  }

  .pcshop-ticker-active .pcshop-nav-links a {
    padding: 10px 12px;
    font-size: 12px;
  }

  .pcshop-nav-fixed .pcshop-nav-link {
    padding: 10px 12px;
    font-size: 12px;
  }

  .pcshop-header-main {
    flex-wrap: nowrap;
    padding: 8px 0;
    gap: 10px;
  }

  /* Hamburger */
  .pcshop-mobile-nav-toggle {
    display: flex;
    width: 36px;
    height: 36px;
  }

  .pcshop-logo a {
    font-size: 16px;
  }
  .pcshop-logo img {
    height: 30px;
  }
  .pcshop-logo .pcshop-logo-tagline {
    display: none;
  }

  /* Search: show icon, hide full bar */
  .pcshop-search {
    display: none;
  }
  .pcshop-search.pcshop-search-open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 12px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  }
  .pcshop-search.pcshop-search-open .pcshop-search-form {
    height: 44px;
    border-radius: 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
  }
  .pcshop-search.pcshop-search-open .pcshop-search-input {
    font-size: 14px;
    padding: 0 14px;
  }
  .pcshop-search.pcshop-search-open .pcshop-search-form button {
    background: var(--pcshop-primary);
    padding: 0 16px;
  }
  .pcshop-search-toggle {
    display: flex;
    order: 3;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0,0,0,0.04);
    border: none;
    cursor: pointer;
  }

  .pcshop-header-actions {
    gap: 2px;
    flex-shrink: 0;
    order: 4;
    margin-left: auto;
  }
  .pcshop-header-action .pcshop-action-label {
    display: none;
  }
  .pcshop-header-action {
    padding: 6px;
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
  }
  .pcshop-header-action:hover {
    background: rgba(0,0,0,0.04);
  }
  .pcshop-header-action .pcshop-action-icon svg {
    width: 20px;
    height: 20px;
  }

  /* --- Top bar --- */
  .pcshop-top-bar .container {
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
  }
  .pcshop-top-left,
  .pcshop-top-right {
    justify-content: center;
    gap: 8px;
    font-size: 11px;
  }
  .pcshop-top-sep {
    display: none;
  }

  /* --- Navigation --- */
  .pcshop-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .pcshop-nav .container {
    flex-wrap: nowrap;
    min-width: max-content;
  }
  .pcshop-nav-categories {
    flex-shrink: 0;
    display: none !important;
  }

  /* --- Hero (detailed styles in modern-hero.css) --- */
  .pcshop-hero-layout {
    min-height: auto;
  }
  .pcshop-hero-slide {
    min-height: auto;
  }

  /* --- Product grids --- */
  .pcshop-products-grid,
  .pcshop-flash-products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }
  .pcshop-categories-grid,
  .pcshop-categories-grid-5 {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px;
  }
  .pcshop-features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
  }

  /* --- Product cards --- */
  .pcshop-product-card .product-thumb {
    aspect-ratio: 1;
  }
  .pcshop-product-card .product-title {
    font-size: 13px;
    line-height: 1.3;
    min-height: 34px;
  }
  .pcshop-product-card .product-price {
    font-size: 15px;
  }
  .pcshop-product-card .product-actions {
    opacity: 1;
    position: static;
    transform: none;
    display: flex;
    gap: 6px;
    margin-top: 8px;
  }
  .pcshop-product-card .product-actions button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
  }

  /* --- Section headings --- */
  .pcshop-section-heading h2 {
    font-size: 20px;
  }
  .pcshop-section-heading p {
    font-size: 13px;
  }

  /* --- Need Help section --- */
  .pcshop-need-help {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 30px 20px;
  }

  /* --- Trust badges --- */
  .pcshop-pd-trust {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* --- Product page --- */
  .pcshop-pd-title {
    font-size: 20px;
  }
  .pcshop-pd-price-box {
    padding: 16px;
  }
  .pcshop-pd-qty-row {
    flex-direction: column;
    gap: 12px;
  }
  .pcshop-pd-qty-row .btn-buy-now {
    width: 100%;
  }
  .pcshop-pd-qty-row .btn-add-to-cart {
    width: 100%;
  }
  .pcshop-pd-specs {
    grid-template-columns: 1fr !important;
  }

  /* --- Product tabs --- */
  .pcshop-pd-tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
  }
  .pcshop-pd-tabs-nav::-webkit-scrollbar {
    display: none;
  }
  .pcshop-pd-tabs-nav::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--pcshop-white, #fff));
    pointer-events: none;
  }
  .pcshop-pd-tabs-nav a {
    white-space: nowrap;
    padding: 12px 16px;
    font-size: 14px;
  }

  /* --- Related products --- */
  .pcshop-pd-related-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  /* --- Footer --- */
  .pcshop-footer-top {
    grid-template-columns: 1fr !important;
    gap: 30px;
    padding: 40px 0;
  }
  .pcshop-footer-newsletter {
    flex-direction: column;
    gap: 12px;
  }
  .pcshop-footer-newsletter input[type="email"] {
    flex: 1;
    min-width: 0;
  }
  .pcshop-footer-payment {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .pcshop-footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 20px 0;
  }

  /* --- Cart page --- */
  .pcshop-cart-layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .pcshop-cart-item {
    grid-template-columns: 80px 1fr !important;
    gap: 12px;
  }
  .pcshop-cart-item img {
    height: 80px;
  }
  .pcshop-cart-item .cart-item-mobile-price {
    display: block !important;
  }

  /* --- Checkout --- */
  .pcshop-checkout-layout {
    grid-template-columns: 1fr !important;
  }
  .pcshop-checkout-sidebar {
    order: -1;
  }
  .pcshop-checkout-form .form-row {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* --- Step indicator --- */
  .pcshop-steps {
    gap: 4px;
    font-size: 12px;
  }
  .pcshop-steps .step-label {
    display: none;
  }

  /* --- Messages Compose Modal --- */
  .pcshop-msg-modal-content {
    width: 95% !important;
    max-height: 90vh;
    border-radius: 12px;
  }
  .pcshop-msg-modal-header {
    padding: 14px 16px;
  }
  .pcshop-msg-modal-header h3 {
    font-size: 16px;
  }
  .pcshop-msg-compose-form {
    padding: 16px;
    max-width: 100%;
  }
  .pcshop-msg-compose-field input,
  .pcshop-msg-compose-field textarea {
    font-size: 16px;
    padding: 12px 14px;
  }
  .pcshop-msg-compose-send {
    padding: 14px;
    font-size: 15px;
  }

  /* --- My Account --- */
  .woocommerce-MyAccount-navigation {
    flex-wrap: nowrap;
    gap: 0;
  }
  .woocommerce-MyAccount-navigation > ul {
    display: none;
  }
  .woocommerce-MyAccount-navigation > .pcshop-myaccount-nav {
    display: block;
    width: 100%;
  }

  /* Custom My Account Nav - Mobile */
  .pcshop-myaccount-nav {
    position: static;
    border-radius: 12px;
    margin-bottom: 16px;
  }
  .pcshop-myaccount-nav__list {
    display: flex;
    overflow-x: auto;
    padding: 6px 12px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .pcshop-myaccount-nav__list::-webkit-scrollbar { display: none; }
  .pcshop-myaccount-nav__item {
    flex-shrink: 0;
    border-bottom: none !important;
  }
  .pcshop-myaccount-nav__link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    white-space: nowrap;
    font-size: 13px;
    border-radius: 10px;
    gap: 0;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all .2s;
    position: relative;
  }
  .pcshop-myaccount-nav__link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  .pcshop-myaccount-nav__link span:not(.pcshop-myaccount-nav__badge) {
    display: none;
  }
  .pcshop-myaccount-nav__item--active .pcshop-myaccount-nav__link {
    background: var(--pcshop-primary);
    color: #fff;
    font-weight: 600;
  }
  .pcshop-myaccount-nav__item--active .pcshop-myaccount-nav__link svg {
    color: #fff;
  }
  .pcshop-myaccount-nav__badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 0;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
  }
  .pcshop-myaccount-nav__item:not(.pcshop-myaccount-nav__item--active) .pcshop-myaccount-nav__badge {
    background: #ef4444;
    color: #fff;
  }
  .pcshop-myaccount-nav__item--logout {
    margin-left: auto;
  }

  /* --- 404 page --- */
  .pcshop-404-cat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* --- Reviews --- */
  .pcshop-reviews-summary {
    flex-direction: column;
    text-align: center;
  }
  .pcshop-review-images {
    gap: 8px;
  }
  .pcshop-review-images img {
    width: 60px;
    height: 60px;
  }

  /* --- Seller dashboard --- */
  .pcshop-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .pcshop-order-card {
    flex-direction: column;
  }
  .pcshop-section-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .pcshop-section-header h2 {
    font-size: 18px;
  }
  .pcshop-notification-bell {
    position: relative;
  }
  .pcshop-notification-bell .pcshop-notif-dropdown {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 99999 !important;
    animation: pcshopNotifSlideUp 0.25s ease;
  }
  @keyframes pcshopNotifSlideUp {
    from { transform: translateY(100%); opacity: 0.5; }
    to { transform: translateY(0); opacity: 1; }
  }
  .pcshop-seller-guide {
    padding: 16px !important;
  }
  .pcshop-seller-guide h3 {
    font-size: 15px !important;
    margin-bottom: 12px !important;
  }
  .pcshop-seller-status-banner {
    padding: 16px !important;
    gap: 10px !important;
  }
  .pcshop-seller-status-banner h3 {
    font-size: 14px !important;
  }
  .pcshop-seller-status-banner p {
    font-size: 13px !important;
  }
  .pcshop-dashboard-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .pcshop-dashboard-actions .pcshop-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
    font-size: 12px;
    padding: 10px 12px;
  }
  /* --- Seller Product Form --- */
  .pcshop-seller-product-form {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .pcshop-form-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    max-width: 100%;
    overflow: hidden;
  }
  .pcshop-form-main {
    min-width: 0;
    overflow: hidden;
  }
  .pcshop-form-sidebar {
    order: -1;
    min-width: 0;
    overflow: hidden;
  }
  .pcshop-form-card {
    padding: 16px !important;
    margin-bottom: 12px !important;
    border-radius: 10px !important;
    overflow: hidden;
  }
  .pcshop-form-card h3 {
    font-size: 15px !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }
  .pcshop-form-row-half,
  .pcshop-form-row-third {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .pcshop-product-form .pcshop-tabs {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    border-bottom: 2px solid #e5e5e5 !important;
    margin-bottom: 16px !important;
    gap: 0 !important;
    padding: 0 !important;
    max-width: 100%;
  }
  .pcshop-product-form .pcshop-tabs::-webkit-scrollbar { display: none; }
  .pcshop-product-form .pcshop-tab {
    padding: 10px 14px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .pcshop-input {
    font-size: 16px !important;
    padding: 12px 14px !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .pcshop-textarea {
    font-size: 16px !important;
    min-height: 100px !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .pcshop-product-form .pcshop-img-preview {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
  }
  .pcshop-img-placeholder {
    height: 200px !important;
  }
  .pcshop-product-form .pcshop-img-upload-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 16px !important;
  }
  .pcshop-product-form .pcshop-gallery-preview {
    gap: 8px !important;
  }
  .pcshop-product-form .pcshop-gallery-preview img {
    width: 70px !important;
    height: 70px !important;
  }
  .pcshop-product-form .pcshop-cat-list {
    max-height: 250px !important;
  }
  .pcshop-product-form .pcshop-tax-search-row {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .pcshop-product-form .pcshop-tax-search-row .pcshop-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .pcshop-product-form .pcshop-form-actions .pcshop-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px !important;
    font-size: 15px !important;
  }
  .pcshop-meta-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  .pcshop-meta-item span:last-child {
    font-size: 12px !important;
    word-break: break-all !important;
  }
  .pcshop-section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .pcshop-section-header h2 {
    font-size: 18px !important;
  }
  .pcshop-section-header .pcshop-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* --- Messaging pages --- */
  .pcshop-messages-page {
    height: 100dvh !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    flex-direction: column !important;
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
  }
  .pcshop-msg-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    border-right: none !important;
    border-radius: 0 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: none !important;
  }
  .pcshop-msg-thread-list {
    flex: 1;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .pcshop-msg-chat {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 100 !important;
    background: #fff !important;
    display: none !important;
  }
  .pcshop-msg-chat.mobile-open {
    display: flex !important;
  }
  .pcshop-msg-back-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .pcshop-msg-sidebar-header {
    padding: 14px 16px 12px;
  }
  .pcshop-msg-sidebar-header h2 {
    font-size: 18px;
  }
  .pcshop-msg-search {
    margin: 8px 12px;
    padding: 8px 12px;
  }
  .pcshop-msg-thread-item {
    padding: 12px 16px;
  }
  .pcshop-msg-thread-avatar img,
  .pcshop-msg-avatar-placeholder {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
  .pcshop-msg-thread-name {
    font-size: 13px;
  }
  .pcshop-msg-thread-preview {
    font-size: 12px;
  }
  .pcshop-msg-thread-time {
    font-size: 10px;
  }
  .pcshop-msg-chat-header {
    padding: 12px 16px;
    gap: 10px;
  }
  .pcshop-msg-chat-avatar {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
  }
  .pcshop-msg-chat-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
  }
  .pcshop-msg-chat-name {
    font-size: 14px;
  }
  .pcshop-msg-chat-body {
    padding: 16px;
    gap: 4px;
  }
  .pcshop-msg-bubble {
    max-width: 85%;
  }
  .pcshop-msg-bubble-content {
    padding: 8px 12px;
    border-radius: 14px;
  }
  .pcshop-msg-text {
    font-size: 13px;
    line-height: 1.4;
  }
  .pcshop-msg-chat-footer {
    padding: 12px 16px;
  }
  .pcshop-msg-input {
    font-size: 16px;
  }
  .pcshop-msg-send-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    padding: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border: none !important;
  }
  .pcshop-msg-send-btn svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
  }

  /* Hide admin bar, header and footer on messages page */
  .pcshop-messages-page ~ .pcshop-footer,
  .pcshop-messages-page ~ footer,
  body.admin-bar #wpadminbar,
  .pcshop-messages-page ~ .pcshop-header,
  .pcshop-messages-page ~ header {
    display: none !important;
  }

  /* --- Notification Dropdown Mobile --- */
  .pcshop-notif-dropdown {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 99999 !important;
    animation: pcshopNotifSlideUp 0.25s ease;
  }
  @keyframes pcshopNotifSlideUp {
    from { transform: translateY(100%); opacity: 0.5; }
    to { transform: translateY(0); opacity: 1; }
  }
  .pcshop-notif-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .pcshop-notif-dropdown-header h4 {
    font-size: 16px;
    font-weight: 700;
  }
  .pcshop-notif-list {
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .pcshop-notif-item {
    padding: 14px 16px;
  }
  .pcshop-notif-item:active {
    background: #f3f4f6;
  }
  .pcshop-notif-msg {
    font-size: 13px;
    line-height: 1.4;
  }
  .pcshop-notif-header {
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .pcshop-notif-header h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
  }
  .pcshop-notif-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f4f6;
    font-size: 20px;
  }
  .pcshop-notif-close:hover {
    background: #e5e7eb;
  }
  .pcshop-notif-list {
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* --- Animations --- */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* ========================================
   480px - Phones
   ======================================== */
@media (max-width: 480px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* --- Header --- */
  .pcshop-header-main {
    padding: 6px 0;
    gap: 6px;
  }
  .pcshop-mobile-nav-toggle {
    width: 34px;
    height: 34px;
  }
  .pcshop-logo a {
    font-size: 15px;
  }
  .pcshop-logo .pcshop-logo-tagline {
    display: none;
  }
  .pcshop-logo img {
    height: 26px;
  }

  .pcshop-search.pcshop-search-open .pcshop-search-form {
    height: 40px;
    border-radius: 10px;
  }
  .pcshop-search.pcshop-search-open .pcshop-search-input {
    font-size: 13px;
    padding: 0 12px;
  }

  .pcshop-header-actions {
    gap: 0;
  }
  .pcshop-header-action {
    padding: 4px;
    width: 34px;
    height: 34px;
  }
  .pcshop-header-action .pcshop-action-icon svg {
    width: 19px;
    height: 19px;
  }
  .pcshop-search-toggle {
    width: 34px;
    height: 34px;
  }
  .pcshop-search-toggle svg {
    width: 20px;
    height: 20px;
  }

  /* --- Top bar --- */
  .pcshop-top-bar {
    display: none;
  }

  /* --- Hero (detailed styles in modern-hero.css) --- */
  .pcshop-hero-layout {
    min-height: auto;
  }
  .pcshop-hero-slide {
    min-height: auto;
  }
  .pcshop-hero-dots {
    bottom: 8px;
  }

  /* --- Product grids --- */
  .pcshop-products-grid,
  .pcshop-flash-products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .pcshop-categories-grid,
  .pcshop-categories-grid-5 {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px;
  }
  .pcshop-features-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* --- Product cards (compact) --- */
  .pcshop-product-card {
    border-radius: 8px;
  }
  .pcshop-product-card .product-thumb {
    aspect-ratio: 1;
  }
  .pcshop-product-card .product-info {
    padding: 10px;
  }
  .pcshop-product-card .product-title {
    font-size: 12px;
    min-height: 30px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
  }
  .pcshop-product-card .product-price {
    font-size: 14px;
  }
  .pcshop-product-card .product-price .original-price {
    font-size: 11px;
  }
  .pcshop-product-card .product-actions button {
    padding: 6px;
    font-size: 11px;
  }

  /* --- Section headings --- */
  .pcshop-section-heading h2 {
    font-size: 18px;
  }

  /* --- Seller Product Form --- */
  .pcshop-seller-product-form {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .pcshop-form-grid {
    overflow: hidden;
    max-width: 100%;
  }
  .pcshop-form-card {
    padding: 14px !important;
    margin-bottom: 10px !important;
  }
  .pcshop-product-form .pcshop-tab {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }
  .pcshop-product-form .pcshop-img-preview {
    height: 160px !important;
  }
  .pcshop-img-placeholder {
    height: 160px !important;
  }
  .pcshop-product-form .pcshop-gallery-preview img {
    width: 60px !important;
    height: 60px !important;
  }
  .pcshop-product-form .pcshop-cat-list {
    max-height: 200px !important;
    padding: 8px !important;
  }

  /* --- Product page --- */
  .pcshop-pd-title {
    font-size: 18px;
  }
  .pcshop-pd-price-current {
    font-size: 24px;
  }
  .pcshop-pd-gallery-thumb {
    width: 50px;
    height: 50px;
  }

  /* --- Footer --- */
  .pcshop-footer-top {
    padding: 30px 0;
    gap: 24px;
  }
  .pcshop-footer-newsletter {
    padding: 12px;
  }
  .pcshop-footer-payment {
    font-size: 11px;
  }

  /* --- Cart --- */
  .pcshop-cart-item {
    grid-template-columns: 60px 1fr !important;
  }
  .pcshop-cart-item img {
    height: 60px;
  }
  .pcshop-cart-item .product-name {
    font-size: 13px;
  }
  .pcshop-cart-summary {
    padding: 16px;
  }

  /* --- Checkout --- */
  .pcshop-checkout-form .form-row {
    padding: 0 0 12px;
  }
  .pcshop-checkout-form input,
  .pcshop-checkout-form select {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* --- My Account Nav --- */
  .pcshop-myaccount-nav__link {
    padding: 8px;
  }
  .pcshop-myaccount-nav__link svg {
    width: 18px;
    height: 18px;
  }

  /* --- Seller dashboard --- */
  .pcshop-stats-grid {
    grid-template-columns: 1fr !important;
  }

  /* --- Messaging --- */
  .pcshop-msg-header {
    padding: 12px;
  }
  .pcshop-msg-header-name {
    font-size: 15px;
  }
  .pcshop-msg-bubble {
    max-width: 85%;
    font-size: 14px;
    padding: 10px 14px;
  }
  .pcshop-msg-compose {
    padding: 10px;
  }
  .pcshop-msg-compose input[type="text"] {
    font-size: 14px;
    padding: 10px 12px;
  }

  /* --- My Account Nav --- */
  .pcshop-myaccount-nav__link {
    padding: 7px;
  }
  .pcshop-myaccount-nav__link svg {
    width: 17px;
    height: 17px;
  }

  /* Prevent any overflow from account content */
  .woocommerce-MyAccount-content {
    overflow-x: hidden;
    max-width: 100%;
  }
}

/* ========================================
   360px - Small phones
   ======================================== */
@media (max-width: 360px) {
  .pcshop-header-main {
    gap: 6px;
    padding: 8px 0;
  }
  .pcshop-logo a {
    font-size: 14px;
  }
  .pcshop-logo .pcshop-logo-icon svg {
    width: 24px;
    height: 24px;
  }
  .pcshop-search.pcshop-search-open .pcshop-search-form {
    height: 38px;
    border-radius: 8px;
  }
  .pcshop-search.pcshop-search-open .pcshop-search-input {
    font-size: 12px;
    padding: 0 10px;
  }
  .pcshop-header-actions {
    gap: 2px;
  }
  .pcshop-header-action {
    padding: 4px;
  }
  .pcshop-header-action .pcshop-action-icon svg {
    width: 18px;
    height: 18px;
  }
  .pcshop-products-grid,
  .pcshop-flash-products {
    grid-template-columns: 1fr !important;
  }
  .pcshop-categories-grid,
  .pcshop-categories-grid-5 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .pcshop-pd-related-grid {
    grid-template-columns: 1fr !important;
  }
  .pcshop-footer-top {
    grid-template-columns: 1fr !important;
  }
  .pcshop-404-cat-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================
   TOUCH / ACCESSIBILITY
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  .pcshop-product-card .product-actions {
    opacity: 1;
    position: static;
    transform: none;
  }
  .pcshop-product-card:hover .product-actions {
    transform: none;
  }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .pcshop-mobile-drawer {
    transition: none;
  }
  .pcshop-mobile-drawer-overlay {
    animation: none;
  }
}

/* ========================================
   SAFE AREA (notch devices)
   ======================================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .pcshop-footer-bottom {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .pcshop-msg-compose {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

/* ========================================
   DARK MODE SUPPORT (system preference)
   ======================================== */
@media (prefers-color-scheme: dark) {
  /* Only apply if theme has dark mode variables */
  :root {
    --pcshop-dark-mode: 1;
  }
}

/* ========================================
   SEARCH RESULTS - MOBILE
   ======================================== */
@media (max-width: 768px) {
  .pcshop-search-results {
    padding: 20px 0 40px;
  }
  .pcshop-search-header {
    margin-bottom: 20px;
  }
  .pcshop-search-title {
    font-size: 20px;
    margin-bottom: 4px;
  }
  .pcshop-search-count {
    font-size: 13px;
  }
  .pcshop-search-products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .pcshop-search-product {
    border-radius: 10px;
  }
  .pcshop-search-product-img {
    aspect-ratio: 1;
  }
  .pcshop-search-product-info {
    padding: 10px;
  }
  .pcshop-search-product-brand {
    font-size: 10px;
  }
  .pcshop-search-product-title {
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .pcshop-search-product-price {
    font-size: 13px;
  }
  .pcshop-search-product-rating {
    font-size: 11px;
  }
  .pcshop-search-product-cat {
    font-size: 10px;
    padding: 2px 6px;
  }
}

@media (max-width: 480px) {
  .pcshop-search-results {
    padding: 16px 0 30px;
  }
  .pcshop-search-title {
    font-size: 18px;
  }
  .pcshop-search-products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .pcshop-search-product-info {
    padding: 8px;
  }
  .pcshop-search-product-title {
    font-size: 11px;
  }
  .pcshop-search-product-price {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .pcshop-search-products {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .pcshop-search-product {
    flex-direction: row;
  }
  .pcshop-search-product-img {
    width: 100px;
    min-width: 100px;
    aspect-ratio: auto;
  }
  .pcshop-search-product-info {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
