/* Custom Styles for Đồ Da Thủ Công */

/* Hide scrollbar for horizontal scrolling sections */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Line clamp utilities */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* Image zoom effect */
.product-image-zoom {
    overflow: hidden;
    cursor: zoom-in;
}

.product-image-zoom img {
    transition: transform 0.3s ease;
}

.product-image-zoom:hover img {
    transform: scale(1.5);
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d46211;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

/* Quantity input */
.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-input button {
    width: 36px;
    height: 36px;
    background: #f3ece7;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.quantity-input button:hover {
    background: #e5ddd6;
}

.quantity-input input {
    width: 60px;
    height: 36px;
    text-align: center;
    border: none;
    font-weight: 500;
}

/* Product filter sidebar */
.filter-group {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.filter-group:last-child {
    border-bottom: none;
}

/* Star rating */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating .star {
    color: #d4d4d4;
    font-size: 18px;
}

.star-rating .star.filled {
    color: #fbbf24;
}

/* Price range slider */
.price-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #e5e7eb;
    outline: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d46211;
    cursor: pointer;
}

.price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d46211;
    cursor: pointer;
}

/* Image gallery */
.image-gallery {
    display: grid;
    gap: 10px;
}

.image-gallery-main {
    grid-column: 1 / -1;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
}

.image-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.image-gallery-thumbnail {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.image-gallery-thumbnail:hover,
.image-gallery-thumbnail.active {
    border-color: #d46211;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .toast {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }
    
    .image-gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Checkout steps */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.checkout-step {
    flex: 1;
    text-align: center;
    padding: 1rem;
    position: relative;
}

.checkout-step::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 0;
    right: 50%;
    height: 2px;
    background: #e5e7eb;
    z-index: -1;
}

.checkout-step:first-child::before {
    display: none;
}

.checkout-step.active .step-number {
    background: #d46211;
    color: white;
}

.checkout-step.completed .step-number {
    background: #10b981;
    color: white;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
}
