:root {
  --bg: #f7f6f2;
  --bg-alt: #ffffff;
  --panel: #ffffff;
  --panel-alt: #eef5fb;
  --text: #17426c;
  --text-muted: #4e6782;
  --accent: #57b8e3;
  --accent-strong: #17426c;
  --danger: #c05b4d;
  --success: #4c8f65;
  --shadow: 0 16px 32px rgba(23, 66, 108, 0.12);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Cairo", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  direction: ltr;
  text-align: left;
}

a {
  color: inherit;
  text-decoration: none;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(247, 246, 242, 0.95);
  border-bottom: 1px solid rgba(23, 66, 108, 0.2);
  box-shadow: 0 8px 20px rgba(23, 66, 108, 0.08);
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.logo img {
  height: clamp(40px, 6vw, 68px);
  width: auto;
  max-width: min(620px, 88vw);
  object-fit: contain;
  display: block;
  border-radius: 0;
  background: transparent;
  padding: 0;
  border: none;
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  font-weight: 500;
  color: var(--accent-strong);
  transition: color 0.2s ease, transform 0.2s ease;
}

nav a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 66, 108, 0.25);
  background: rgba(87, 184, 227, 0.14);
  color: var(--accent-strong);
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle:hover {
  background: rgba(87, 184, 227, 0.26);
}

.nav-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 66, 108, 0.25);
  background: rgba(87, 184, 227, 0.14);
}

.nav-social:hover {
  background: rgba(87, 184, 227, 0.26);
}

.nav-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
  object-fit: contain;
}

.nav-user {
  font-weight: 600;
  color: var(--accent-strong);
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  padding: 0.05rem 0.5rem;
  margin-left: 0.5rem;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: 2rem;
  padding: 5rem 3rem 3rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin: 0;
  line-height: 1.1;
}

.hero p {
  margin: 1.5rem 0 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.btn-primary {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 18px 30px rgba(87, 184, 227, 0.35);
}

.btn-outline {
  border: 1px solid rgba(23, 66, 108, 0.25);
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.82);
}

.btn:hover {
  transform: translateY(-2px) scale(1.01);
}

main {
  padding: 0 3rem 3rem;
}

.panel {
  background: var(--panel);
  border-radius: 1.5rem;
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
  border: 1px solid rgba(23, 66, 108, 0.14);
}

.panel-lite {
  background: var(--panel-alt);
  border: 1px solid rgba(23, 66, 108, 0.14);
  border-radius: 1.1rem;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.panel-lite h3 {
  margin: 0;
}

.panel-lite button {
  justify-self: start;
}

.table-scroll {
  overflow-x: auto;
}

.upload-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(87, 184, 227, 0.13);
  border: 1px solid rgba(23, 66, 108, 0.25);
  font-size: 0.85rem;
  color: var(--text);
}

.chip-list button {
  background: none;
  border: none;
  color: var(--danger);
  font-weight: 600;
  cursor: pointer;
}

.chip-list button:hover {
  text-decoration: underline;
}

.field-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.image-preview .image-chip {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(23, 66, 108, 0.2);
  box-shadow: 0 6px 14px rgba(23, 66, 108, 0.2);
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview button {
  position: absolute;
  top: 4px;
  right: 4px;
  border: none;
  background: rgba(23, 66, 108, 0.9);
  color: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  cursor: pointer;
}

.image-preview button:hover {
  background: rgba(87, 184, 227, 0.95);
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.inventory-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.inventory-subtitle {
  color: var(--text-muted);
  margin: 0.25rem 0 0;
  max-width: 520px;
}

.filters-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.filters-form input,
.filters-form select {
  width: 100%;
}

.filters-form .inline-field {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
  align-items: end;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid rgba(23, 66, 108, 0.2);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font: inherit;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(87, 184, 227, 0.3);
}

.laptop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;
  gap: 1rem;
}

.catalog-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.catalog-section {
  display: grid;
  gap: 0.9rem;
  padding: 0.5rem 1rem 1.25rem;
  border-top: 1px solid rgba(23, 66, 108, 0.18);
}

.catalog-section:first-child {
  border-top: none;
  padding-top: 0;
}

.catalog-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.catalog-heading h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;
  gap: 1rem;
}

.laptop-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(23, 66, 108, 0.16);
  border-radius: 1rem;
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.laptop-card:hover {
  transform: translateY(-6px);
  border-color: rgba(23, 66, 108, 0.35);
  box-shadow: 0 14px 30px rgba(23, 66, 108, 0.16);
}

.card-thumb {
  width: 100%;
  height: auto;
  max-height: 160px;
  border-radius: 1rem;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.card-content {
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.card-title-row {
  display: grid;
  gap: 0.25rem;
}

.laptop-card h3 {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.title-desktop {
  display: block !important;
}

.title-mobile {
  display: none !important;
}

.laptop-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: left;
}

.price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(87, 184, 227, 0.2);
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.spec-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.spec-inline span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.2rem;
}

.spec-inline strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}

.compact-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--panel);
  border-radius: 1rem;
  padding: 1.75rem;
  border: 1px solid rgba(23, 66, 108, 0.16);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.stat-card strong {
  font-size: 2rem;
  color: var(--text);
}

footer.site-footer {
  padding: 2.2rem 3rem 2.4rem;
  color: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(87, 184, 227, 0.4);
  background: var(--accent-strong);
  display: grid;
  gap: 1.35rem;
}

footer.site-footer a {
  color: #d2effc;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.footer-logo {
  height: clamp(72px, 10vw, 122px);
  width: auto;
  max-width: min(980px, 96vw);
  object-fit: contain;
  display: block;
}

.footer-socials {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.footer-social {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(210, 239, 252, 0.38);
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.footer-social:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.footer-social-icon {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
  color: #fff;
}

.footer-social-image {
  object-fit: contain;
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.65rem 1.25rem;
  font-size: 0.92rem;
}

.footer-contact p {
  margin: 0;
}

.footer-copy {
  margin: 0;
  padding-top: 0.35rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.86);
}

.detail-layout {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  margin-top: 2rem;
}

#detail-panel {
  font-size: 0.8rem;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

#detail-panel .detail-title {
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
}

#detail-panel .price {
  font-size: 0.95rem;
}

#detail-panel .panel h2,
#detail-panel .detail-specs h2 {
  font-size: 1.05rem;
}

#detail-panel .spec-item {
  font-size: 0.8rem;
}

body.page-detail main {
  padding: 0 1rem 3rem;
}

body.page-main main {
  padding: 0 0 3rem;
}

#inventory {
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

#inventory .inventory-header {
  padding: 0.75rem 1rem 0;
}

#inventory #inventory-status {
  padding: 0 1rem;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(320px, 48%) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
  min-width: 0;
}

.detail-copy {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  max-height: min(78vh, 760px);
  overflow: auto;
  padding-right: 0.35rem;
}

.detail-heading {
  display: grid;
  gap: 0.65rem;
}

.detail-title {
  margin: 0;
  font-size: clamp(1.75rem, 2.6vw, 2.4rem);
  line-height: 1.15;
}

.detail-description {
  margin: 0;
  color: var(--text-muted);
}

.detail-specs {
  display: grid;
  gap: 1rem;
}

.detail-specs h2 {
  margin: 0;
}

.detail-specs-inline {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(23, 66, 108, 0.16);
  border-radius: 0.9rem;
  padding: 0.8rem 0.9rem;
}

.detail-specs-inline .spec-list {
  max-height: 450px;
  overflow: auto;
  padding-right: 0.35rem;
}

.detail-purchase {
  position: sticky;
  top: 5.75rem;
  align-self: start;
}

.contact-availability {
  color: var(--text-muted);
  padding-inline-start: 1.25rem;
  line-height: 1.6;
  margin: 0;
}

.contact-editor {
  margin-top: 2rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.gallery {
  position: relative;
  min-width: 0;
}

.detail-gallery {
  max-width: 560px;
}

.gallery-slider {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(23, 66, 108, 0.16);
}

.gallery-window {
  overflow: hidden;
  width: 100%;
}

.gallery-track {
  display: flex;
  transition: transform 0.35s ease;
  width: 100%;
}

.gallery-slide {
  flex: 0 0 100%;
  margin: 0;
  display: block;
  aspect-ratio: 1 / 1;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  object-fit: cover;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(23, 66, 108, 0.3);
  background: rgba(247, 246, 242, 0.95);
  color: var(--accent-strong);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  z-index: 1;
}

.gallery-nav.prev {
  left: 0.75rem;
}

.gallery-nav.next {
  right: 0.75rem;
}

.gallery-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.gallery-nav:not(:disabled):hover {
  background: rgba(87, 184, 227, 0.24);
  transform: translateY(-50%) scale(1.05);
}

.spec-list {
  display: grid;
  gap: 0.75rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.spec-item strong {
  color: var(--text);
}

.order-form {
  display: grid;
  gap: 1rem;
}

.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-actions {
  align-items: stretch;
}

.cart-table td,
.cart-table th {
  vertical-align: middle;
}

.catalog-table td,
.catalog-table th {
  vertical-align: middle;
}

.status-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-select {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(23, 66, 108, 0.24);
  color: var(--text);
  border-radius: 0.75rem;
  padding: 0.35rem 0.75rem;
}

.status-select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(87, 184, 227, 0.3);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.9rem;
  border: 1px solid rgba(23, 66, 108, 0.2);
}

.quantity-input {
  width: 72px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid rgba(23, 66, 108, 0.24);
  border-radius: 0.75rem;
  padding: 0.4rem 0.5rem;
}

.quantity-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(87, 184, 227, 0.3);
}

.link-button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.link-button:hover {
  text-decoration: underline;
}

.link-button[disabled] {
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: none;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0 1rem;
  font-size: 1.2rem;
}

.cart-summary strong {
  color: var(--accent);
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.summary-list strong {
  display: block;
  margin-bottom: 0.25rem;
}

.summary-list .field-hint {
  display: block;
  margin-top: 0.2rem;
}

.order-status {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.orders-table th,
.orders-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(23, 66, 108, 0.14);
}

.orders-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: capitalize;
}

.status-pill.pending {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
}

.status-pill.confirmed {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.status-pill.completed {
  background: rgba(87, 184, 227, 0.24);
  color: var(--accent);
}

.status-pill.cancelled {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: 0.8rem;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.35);
  margin-top: 1rem;
}

.toast.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.35);
}

@media (max-width: 900px) {
  header {
    padding: 0.85rem 1.5rem;
  }

  .hero {
    padding: 4rem 1.75rem 2.5rem;
  }

  main {
    padding: 0 1.75rem 2rem;
  }

  footer.site-footer {
    padding: 1.5rem 1.75rem 2rem;
  }

  .footer-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-logo {
    height: clamp(80px, 14vw, 132px);
    max-width: min(920px, 97vw);
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-main {
    grid-template-columns: 1fr;
    gap: 1rem;
    order: 1;
  }

  .detail-copy {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .detail-purchase {
    position: static;
    order: 2;
  }

  .detail-specs {
    order: 3;
  }

  .detail-gallery {
    max-width: none;
    order: -1;
  }

  .detail-specs-inline .spec-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .title-desktop {
    display: none !important;
  }

  .title-mobile {
    display: block !important;
  }
}

@media (max-width: 600px) {
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem 1rem;
    background: rgba(247, 246, 242, 0.99);
    border-bottom: 1px solid rgba(23, 66, 108, 0.2);
  }

  .logo img {
    height: clamp(40px, 9vw, 62px);
    max-width: min(520px, 88vw);
  }

  .panel {
    padding: 1.25rem;
  }

  header {
    justify-content: space-between;
  }

  body.nav-open nav {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  nav a {
    width: 100%;
    padding: 0.35rem 0;
  }

  .laptop-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .laptop-card {
    display: grid;
    grid-template-columns: minmax(110px, 34%) 1fr;
    padding: 0.9rem;
    gap: 0.5rem;
    align-items: center;
  }

  .card-thumb {
    min-height: 110px;
    height: 110px;
    aspect-ratio: 1 / 1;
  }

  .compact-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .footer-contact {
    grid-template-columns: 1fr;
    font-size: 0.9rem;
  }
}

/* Device-based mobile layout to avoid relying on viewport width */
@media (pointer: coarse) {
  .title-desktop {
    display: none !important;
  }

  .title-mobile {
    display: block !important;
  }

  .detail-main {
    grid-template-columns: 1fr;
    gap: 1rem;
    order: 1;
  }

  .detail-copy {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .detail-purchase {
    position: static;
    order: 2;
  }

  .detail-specs {
    order: 3;
  }

  .detail-gallery {
    max-width: none;
    order: -1;
  }

  .detail-specs-inline .spec-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .laptop-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .laptop-card {
    display: grid;
    grid-template-columns: minmax(110px, 34%) 1fr;
    padding: 0.9rem;
    gap: 0.5rem;
    align-items: center;
  }

  .card-thumb {
    min-height: 110px;
    height: 110px;
    aspect-ratio: 1 / 1;
  }

  .compact-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .compact-actions .price {
    text-align: left;
  }
}
