/* Retail-specific styles */

/* Line clamp utility for product titles */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product card hover effects */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-card img {
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* Category tile gradients */
.category-tile {
    position: relative;
    overflow: hidden;
}

.category-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 27, 75, 0.8) 0%, rgba(30, 27, 75, 0.2) 50%, transparent 100%);
    z-index: 1;
}

.category-tile:hover::before {
    background: linear-gradient(to top, rgba(30, 27, 75, 0.9) 0%, rgba(30, 27, 75, 0.4) 50%, rgba(59, 130, 246, 0.2) 100%);
}

/* Details/Summary accordion styling */
details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Cart item transitions */
.cart-item {
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: #f8fafc;
}

/* Quantity input styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Toast notification */
.toast-enter {
    transform: translateY(100%);
    opacity: 0;
}

.toast-enter-active {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s ease;
}

.toast-exit {
    transform: translateY(0);
    opacity: 1;
}

.toast-exit-active {
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

/* Checkout form styling */
.checkout-form input:focus,
.checkout-form select:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Order summary sticky behavior */
@media (min-width: 1024px) {
    .order-summary-sticky {
        position: sticky;
        top: 6rem;
    }
}

/* Mobile filter panel */
@media (max-width: 1023px) {
    #filter-panel {
        background: white;
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        border: 1px solid #e5e7eb;
    }
}

/* Product image gallery */
.product-gallery-thumb {
    transition: border-color 0.2s ease;
}

.product-gallery-thumb:hover,
.product-gallery-thumb.active {
    border-color: #3B82F6;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Button disabled state */
button:disabled {
    cursor: not-allowed;
}

/* Form validation styling */
input:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

/* Scroll behavior for checkout */
.checkout-scroll {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.checkout-scroll::-webkit-scrollbar {
    width: 6px;
}

.checkout-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.checkout-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Smooth page transitions */
main {
    animation: fadeIn 0.3s ease;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Print styles for order confirmation */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    
    main {
        padding-top: 0 !important;
    }
}
