/* Shop CSS - Tailwind-like utility classes for the webshop */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }

.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Sizing */
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }
.w-48 { width: 12rem; }
.w-64 { width: 16rem; }
.w-full { width: 100%; }

.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }
.h-24 { height: 6rem; }
.h-full { height: 100%; }

.min-h-screen { min-height: 100vh; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }

.aspect-square { aspect-ratio: 1 / 1; }

/* Portrait product-card thumbnails (rectangle) */
.aspect-portrait { aspect-ratio: 3 / 4; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.uppercase { text-transform: uppercase; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tracking-wider { letter-spacing: 0.05em; }

/* Colors */
.text-white { color: #ffffff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-blue-100 { color: #dbeafe; }
.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.text-blue-800 { color: #1e40af; }
.text-green-500 { color: #22c55e; }
.text-green-600 { color: #16a34a; }
.text-green-800 { color: #166534; }
.text-yellow-500 { color: #eab308; }
.text-yellow-600 { color: #ca8a04; }
.text-yellow-800 { color: #854d0e; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-red-800 { color: #991b1b; }
.text-orange-600 { color: #ea580c; }
.text-orange-800 { color: #9a3412; }
.text-indigo-800 { color: #3730a3; }
.text-emerald-800 { color: #065f46; }
.text-purple-600 { color: #9333ea; }

.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: #1f2937; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-700 { background-color: #1d4ed8; }
.bg-blue-800 { background-color: #1e40af; }
.bg-green-100 { background-color: #dcfce7; }
.bg-green-500 { background-color: #22c55e; }
.bg-green-600 { background-color: #16a34a; }
.bg-yellow-100 { background-color: #fef9c3; }
.bg-yellow-500 { background-color: #eab308; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-500 { background-color: #ef4444; }
.bg-orange-100 { background-color: #ffedd5; }
.bg-indigo-100 { background-color: #e0e7ff; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-purple-100 { background-color: #f3e8ff; }
.bg-black { background-color: #000000; }

.bg-opacity-50 { --tw-bg-opacity: 0.5; }

.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.from-blue-600 { --tw-gradient-from: #2563eb; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.to-blue-800 { --tw-gradient-to: #1e40af; }
.from-gray-100 { --tw-gradient-from: #f3f4f6; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.to-gray-200 { --tw-gradient-to: #e5e7eb; }

/* Borders */
.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }

.border-transparent { border-color: transparent; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-700 { border-color: #374151; }
.border-blue-400 { border-color: #60a5fa; }
.border-blue-500 { border-color: #3b82f6; }
.border-blue-600 { border-color: #2563eb; }
.border-green-500 { border-color: #22c55e; }
.border-red-500 { border-color: #ef4444; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-l { border-top-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem; }
.rounded-r { border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem; }
.rounded-l-lg { border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; }
.rounded-r-lg { border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }

.divide-y > * + * { border-top-width: 1px; border-top-style: solid; border-color: #e5e7eb; }

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.top-2 { top: 0.5rem; }
.top-24 { top: 6rem; }
.right-0 { right: 0; }
.right-2 { right: 0.5rem; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.left-3 { left: 0.75rem; }

.-top-1 { top: -0.25rem; }
.-right-1 { right: -0.25rem; }

.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Object Fit */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* Cursor */
.cursor-not-allowed { cursor: not-allowed; }

/* Transition */
.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Hover states */
.hover\:text-white:hover { color: #ffffff; }
.hover\:text-gray-700:hover { color: #374151; }
.hover\:text-gray-900:hover { color: #111827; }
.hover\:text-blue-600:hover { color: #2563eb; }
.hover\:text-blue-700:hover { color: #1d4ed8; }
.hover\:text-red-600:hover { color: #dc2626; }
.hover\:text-gray-600:hover { color: #4b5563; }
.hover\:underline:hover { text-decoration: underline; }

.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-blue-50:hover { background-color: #eff6ff; }
.hover\:bg-blue-200:hover { background-color: #bfdbfe; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-green-200:hover { background-color: #bbf7d0; }
.hover\:bg-purple-200:hover { background-color: #e9d5ff; }
.hover\:bg-orange-200:hover { background-color: #fed7aa; }

.hover\:border-blue-400:hover { border-color: #60a5fa; }
.hover\:border-blue-600:hover { border-color: #2563eb; }

.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }

.hover\:scale-105:hover { transform: scale(1.05); }

.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:bg-blue-200 { background-color: #bfdbfe; }
.group:hover .group-hover\:bg-green-200 { background-color: #bbf7d0; }
.group:hover .group-hover\:bg-purple-200 { background-color: #e9d5ff; }
.group:hover .group-hover\:bg-orange-200 { background-color: #fed7aa; }

/* Focus states */
.focus\:ring-2:focus { --tw-ring-width: 2px; box-shadow: 0 0 0 var(--tw-ring-width) var(--tw-ring-color, #3b82f6); }
.focus\:ring-blue-500:focus { --tw-ring-color: #3b82f6; }
.focus\:border-transparent:focus { border-color: transparent; }

/* Disabled states */
.disabled\:bg-gray-300:disabled { background-color: #d1d5db; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }

/* Alpine.js cloak */
[x-cloak] { display: none !important; }

/* Responsive */
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:flex-row { flex-direction: row; }
    .md\:hidden { display: none; }
    .md\:block { display: block; }
    .md\:inline { display: inline; }
    .md\:items-center { align-items: center; }
    .md\:justify-between { justify-content: space-between; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:w-64 { width: 16rem; }
    .md\:mt-0 { margin-top: 0; }
    .md\:mb-0 { margin-bottom: 0; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
    appearance: none;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    vertical-align: middle;
    accent-color: #2563eb;
    appearance: auto;
    -webkit-appearance: auto;
}

input[type="checkbox"]:checked {
    /* native rendering */
}

input:disabled,
select:disabled,
textarea:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    vertical-align: middle;
}

/* Lists */
ul.list-disc {
    list-style-type: disc;
    padding-left: 1.5rem;
}

ul.list-inside {
    list-style-position: inside;
}

/* Prose (for product descriptions) */
.prose {
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1rem;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Additional utilities for support ticket pages */
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }

.border-gray-200 { border-color: #e5e7eb; }
.border-green-400 { border-color: #4ade80; }
.border-red-400 { border-color: #f87171; }
.border-blue-200 { border-color: #bfdbfe; }

.text-yellow-700 { color: #a16207; }
.text-green-700 { color: #15803d; }
.text-blue-200 { color: #bfdbfe; }

.bg-blue-200 { background-color: #bfdbfe; }

.whitespace-pre-wrap { white-space: pre-wrap; }

.max-h-\[560px\] { max-height: 560px; }
.max-w-\[260px\] { max-width: 260px; }

.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:bg-green-700:hover { background-color: #15803d; }
.hover\:text-blue-900:hover { color: #1e3a8a; }
.hover\:border-gray-300:hover { border-color: #d1d5db; }

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.flex-wrap { flex-wrap: wrap; }

.min-w-0 { min-width: 0; }

.ring-2 { box-shadow: 0 0 0 2px var(--tw-ring-color, #3b82f6); }
.ring-blue-500 { --tw-ring-color: #3b82f6; }

.rotate-180 { transform: rotate(180deg); }

.max-h-\[520px\] { max-height: 520px; }

.text-\[11px\] { font-size: 11px; }

.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }

.pr-1 { padding-right: 0.25rem; }

/* Mobile-friendly select elements */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Size selector specific styles */
#size-single,
#size-str1,
#size-str2 {
    font-size: 16px; /* Prevents iOS zoom */
    min-height: 48px; /* Better touch target */
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#size-single:focus,
#size-str1:focus,
#size-str2:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Mobile styles for selects */
@media (max-width: 640px) {
    select {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    #size-single,
    #size-str1,
    #size-str2 {
        min-height: 52px;
        font-size: 17px;
        padding: 0.875rem 2.5rem 0.875rem 1rem;
    }
    
    /* Make size selector labels more prominent on mobile */
    #size-selects label {
        font-size: 0.9rem;
        font-weight: 500;
    }
}

/* Focus utilities */
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--tw-ring-color, #3b82f6); }
.focus\:ring-blue-500:focus { --tw-ring-color: #3b82f6; }
.focus\:border-blue-500:focus { border-color: #3b82f6; }

/* Text base for selects */
.text-base { font-size: 1rem; line-height: 1.5rem; }

