:root {
    --toolbar-height: 56px;
    color-scheme: light;
}

html, body {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+/Edge */
    user-select: none;         /* Standard */
    overscroll-behavior-y: contain; /* Or 'none' for a more drastic removal */
}
img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}
a {
    text-decoration: none;
}
a,
.contact-link, /* Target your specific contact links */
button,
input,
select { /* Include other interactive elements you might have */
    -webkit-tap-highlight-color: transparent; /* For WebKit browsers (Chrome, Safari, Android browsers) */
    -webkit-touch-callout: none; /* iOS specific, prevents callout menu */
    -webkit-user-select: none; /* Already in your code, but good to combine */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+/Edge */
    user-select: none;         /* Standard */
}
/*a {
    -webkit-user-drag: none; !* For Chrome, Safari *!
    -moz-user-drag: none;    !* For Firefox *!
    user-drag: none;         !* Standard property *!
}*/

body{
    background-color: #EFEFEF;
}
.toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--toolbar-height);
    background-color: var(--primary-color);
    z-index: 1000;
}

.toolbar-content {
    display: flex;
    align-items: center;
    height: calc(var(--toolbar-height) - 2.5px);
    padding: 0 16px;
}

.back-button {
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.toolbar-title {
    color: var(--white);
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 0 10px;
}

.gradient-line {
    height: 2.5px;
    background: linear-gradient(to right, #ffec88, #b47a1a);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.products-grid {
    display: grid;
    gap: 16px;
    padding: calc(var(--toolbar-height) + 16px) 16px 80px;
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.product-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: #fff;
}
.product-image-wrapper {
    width: 100%;
    position: relative;
    display: block;
    /* aspect-ratio is set inline */
}

.product-thumbnail {
    width: 100%;
    height: 100%;
   /* object-fit: cover;*/
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: var(--primary-color);
}

/* Circular Spinner */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #eee;
    border-top: 4px solid var(--primary-color, #1976d2);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.whatsapp-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Responsive Design */
@media (min-width: 768px) {
    .products-grid {
        padding: calc(var(--toolbar-height) + 16px) 20px 80px;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 1024px) {
    .products-grid {
        padding: calc(var(--toolbar-height) + 16px) 50px 80px;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        /*grid-auto-rows: minmax(200px, auto);*/
    }
}

.product-context-menu {
    position: absolute;
    z-index: 2000;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 180px;
    padding: 4px 0;
    font-size: 15px;
    user-select: none;
}
.context-menu-item {
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.15s;
}
.context-menu-item:hover {
    background: #f5f5f5;
}

.sort-fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color, #1976d2);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2002;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.sort-fab:hover {
    background: #155fa0;
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
}

.sort-sheet {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35); /* overlay */
    z-index: 2100; /* above fab */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(.4,0,.2,1);
}
.sort-sheet.active {
    pointer-events: auto;
    opacity: 1;
}
.sort-sheet-content {
    background: #fff;
    border-radius: 16px 16px 0 0;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 20px 16px 20px;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
    position: relative;
    bottom: 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
.sort-sheet.active .sort-sheet-content {
    transform: translateY(0);
}
.sort-sheet-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 18px;
    text-align: center;
}
.sort-option {
    width: 100%;
    padding: 14px 0;
    margin-bottom: 10px;
    font-size: 17px;
    border: none;
    border-radius: 8px;
    background: #f5f5f5;
    color: #222;
    cursor: pointer;
    transition: background 0.18s;
}
.sort-option:last-child {
    margin-bottom: 0;
}
.sort-option:hover, .sort-option.selected {
    background: var(--primary-color, #1976d2);
    color: #fff;
}
@media (max-width: 600px) {
    .sort-fab {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
    .sort-sheet-content {
        max-width: 100vw;
        padding: 18px 8px 10px 8px;
    }
}

/* Fade-in for images */
.fadein-img {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.fadein-img.loaded {
  opacity: 1;
}
/* Fade-in for backgrounds */
.fadein-bg {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.fadein-bg.bg-loaded {
  opacity: 1;
} 

.product-name-text {
  color: rgba(0,0,0,0.72); /* #b9000000 */
  padding: 5px 3px;
  line-height: 1.3;
  margin-top: 0;
  font-size: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;

  word-break: break-word;
    text-align: center;
} 