


.products-grid.single-column .product-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.products-grid.single-column .product-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--surface);
  width: 100%;
}

.products-grid.single-column .product-card-image,
.products-grid.single-column .product-card-image-placeholder {
  width: 80px;
  height: 80px;
  margin-right: 1rem;
  flex-shrink: 0;
}

.products-grid.single-column .product-card-info {
  flex: 1;
  text-align: left;
}

.products-grid.single-column .product-card-name {
  font-size: clamp(0.8rem, 3.5vw, 1rem);
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.products-grid.single-column .product-card-price {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.products-grid.single-column .product-card-button {
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
}


@media (max-width: 1024px) {
  .hide-mobile {
    display: none !important;
  }

  html,
  body {
    font-size: 14px;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
  }

  
  h1, h2, h3, h4, h5, h6, p, span, div, a {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  
  #ordersTable th,
  #ordersTable td {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  #ordersTable th:nth-child(1),
  #ordersTable td:nth-child(1),
  #ordersTable th:nth-child(3),
  #ordersTable td:nth-child(3),
  #ordersTable th:nth-child(4),
  #ordersTable td:nth-child(4),
  #ordersTable th:nth-child(5),
  #ordersTable td:nth-child(5) {
    white-space: nowrap;
  }

  #ordersTable th:nth-child(7),
  #ordersTable td:nth-child(7),
  .order-reply-cell,
  .order-reply-content,
  .copyable-reply-text {
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }

  .logo-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .logo-title {
    max-width: 100%;
  }

  .container-mobile {
    padding: 1rem;
  }

  .grid-mobile-1 {
    grid-template-columns: 1fr !important;
  }

  .text-mobile-sm {
    font-size: 0.875rem;
  }

  .p-mobile-4 {
    padding: 1rem !important;
  }

  
  .product-card-favorite {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    top: 8px;
    right: 8px;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1;
  }

  .product-card-favorite svg {
    width: 14px !important;
    height: 12px !important;
    flex-shrink: 0;
    display: block;
  }

  .product-card-favorite svg path {
    vector-effect: non-scaling-stroke;
  }

  
  .products-grid.table-view .product-card-image,
  .products-grid.table-view .product-card-image-placeholder {
    width: 0;
    height: 0;
    margin-right: 0;
    display: none;
  }

  .products-grid.table-view .product-card-info {
    margin-right: 0.5rem;
    min-width: 0;
    flex: 1;
  }

  .products-grid.table-view .product-card-name {
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
  }

  .products-grid.table-view .product-card-price {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }

  .products-grid.table-view .product-card-button {
    padding: 0.075rem 0.75rem;
    font-size: 0.75rem;
    min-width: 70px;
  }

  .products-grid.table-view .product-card {
    padding: 1rem 1.25rem;
    border-radius: 0.25rem;
  }

  .products-grid.table-view .product-grid {
    gap: 0.5rem;
  }

  .products-grid.table-view .product-group {
    margin-bottom: 0.75rem;
  }

  .products-grid.table-view .product-group-title {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    padding-bottom: 0.25rem;
  }
}


@media (min-width: 1025px) and (max-width: 1200px) {
  .hide-tablet {
    display: none !important;
  }

  .grid-tablet-2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #groups {
    display: grid;
    gap: 1.5rem;
  }

  
  #groups.table-view .product-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  
  .search-input-container {
    flex: 1 1 auto;
    min-width: 0;
  }

  .search-section>div:first-child {
    flex: 1 1 100%;
    min-width: 0;
    margin-inline: 0 !important;
  }

  .search-section>div:last-child {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0.75rem 0 0 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .search-section {
    flex-wrap: wrap;
    max-width: 100%;
  }
}




@media (min-width: 1201px) {
  .hide-desktop {
    display: none !important;
  }

  .grid-desktop-3 {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  
  #groups .product-group {
    display: block;
  }

  #groups .product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
  }

  
  #groups.table-view .product-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}


@media (min-width: 1440px) {
  #groups .product-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
  }

  
  #groups.table-view .product-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}


@media (hover: none) and (pointer: coarse) {
  button {
    padding: 0.75rem 1.25rem;
    min-height: 44px;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
    
  }
}


@media (max-height: 500px) and (orientation: landscape) {
  header {
    padding: 0.5rem;
  }

  main {
    padding: 1rem 0;
  }
}


@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}


@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .app-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
  }

  body:has(.app-header) {
    padding-top: 64px;
  }
}


html.dark {
  color-scheme: dark;
}

html.dark body {
  background-color: #0f172a;
  color: #e2e8f0;
}

html.dark input,
html.dark select,
html.dark textarea {
  background-color: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}


@media (max-width: 768px) {
  
  #groups .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.25rem !important; 
  }
  
  
  .products-grid.list-view .product-card {
    padding: 0.25rem !important; 
    border-radius: 0.375rem !important; 
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  
  .products-grid.list-view .product-card-image,
  .products-grid.list-view .product-card-image-placeholder {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 !important;
    margin-right: 0 !important;
    margin-bottom: 0.5rem !important;
    border-radius: 0.375rem !important;
  }
  
  
  .products-grid.list-view .product-card-info-wrapper {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin-bottom: 0.5rem !important;
  }

  
  .products-grid.list-view .product-card-name {
    font-size: 0.75rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.25rem !important;
    
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 5em !important; 
  }

  
  .products-grid.list-view .product-card-price,
  .products-grid.list-view .list-view-price,
  .products-grid.list-view .list-view-current {
    font-size: 0.85rem !important;
    margin-bottom: 0 !important;
  }

  .products-grid.list-view .product-card-original-price,
  .products-grid.list-view .list-view-original {
    font-size: 0.7rem !important;
  }

  
  .products-grid.list-view .product-card-button {
    font-size: 0.75rem !important;
    padding: 0.1rem 0.75rem !important; 
    width: auto !important;
    min-width: 100px !important;
    max-width: 90% !important;
    margin-top: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  
  .product-card-favorite {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    top: 4px !important;
    right: 4px !important;
  }
  
  .product-card-favorite svg {
    width: 12px !important;
    height: 10px !important;
  }

  
  .products-grid.list-view .product-group {
    padding: 0.5rem !important; 
    margin-bottom: 1rem !important; 
    border-radius: 1rem !important;
  }

  
  .products-grid.list-view .product-group-title {
    width: calc(100% + 1rem) !important; 
    margin-left: -0.5rem !important;
    margin-right: -0.5rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    font-size: 1.125rem !important;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.25rem !important;
  }

  .products-grid.list-view .product-group-title::before {
    left: 0.5rem !important;
  }

  
  .products-grid.single-column .product-card-button {
    padding: 0.15rem 1rem !important;
  }
}
