/* Interface Improvements */

/* Loading States */
.loader {
    transition: opacity 0.3s ease;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #F28123;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Improvements */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #F28123;
    box-shadow: 0 0 0 3px rgba(242, 129, 35, 0.1);
}

.form-control.error {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 4px;
}

/* Button Improvements */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #F28123;
    color: white;
}

.btn-primary:hover {
    background-color: #e6741f;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: #dc3545;
}

/* Modal Improvements */
.modal-overlay {
    backdrop-filter: blur(4px);
}

.modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Indicators */
*:focus {
    outline: 2px solid #F28123;
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #F28123;
    outline-offset: 2px;
}

/* Card Improvements */
.card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Table Improvements */
.cart-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cart-table th,
.cart-table td {
    padding: 16px;
    border-bottom: 1px solid #e1e5e9;
}

.cart-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .cart-table {
        font-size: 14px;
    }
    
    .cart-table th,
    .cart-table td {
        padding: 8px;
    }
}

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

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

/* Improved Star Rating */
.star-rating {
    display: flex;
    gap: 4px;
}

.star {
    color: #ddd;
    font-size: 20px;
    transition: color 0.2s ease;
}

.star.filled {
    color: #ffc107;
}

/* Progress Indicators */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #F28123;
    transition: width 0.3s ease;
}

/* Search Improvements */
.search-trigger {
    background: none;
    border: 1px solid #F28123;
    color: #F28123;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.search-trigger:hover {
    background: #F28123;
    color: white;
}

.search-area {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.8) !important;
    z-index: 99999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
}

.search-box {
    background: white !important;
    padding: 30px !important;
    border-radius: 10px !important;
    width: 90% !important;
    max-width: 500px !important;
    position: relative !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}

.search-area h3 {
    margin: 0 0 20px 0;
    text-align: center;
}

.search-area input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #F28123;
    border-radius: 5px;
    box-sizing: border-box;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-info {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shopping-cart {
    position: relative;
    display: inline-block;
}

#cart-count {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 10px;
    position: absolute;
    top: 0px;
    right: 0px;
    min-width: 16px;
    height: 16px;
    line-height: 12px;
    text-align: center;
    font-weight: bold;
}

/* Search form improvements */
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #F28123;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

.search-form button {
    background: #F28123;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: #e6741f;
}

/* Active Navigation Link */
.main-menu ul li a.active {
    color: #F28123 !important;
    font-weight: bold;
}

.main-menu ul li a.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #F28123;
}