/* Cart Page Styles */
.cart-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #764ba2 100%);
    color: var(--white);
    padding: 120px 0 60px;
    text-align: center;
}

.cart-header h1 {
    color: var(--white);
}

.cart-content {
    padding: 60px 0;
    background: var(--bg-light);
    min-height: 60vh;
}

.cart-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-top: 2rem;
}

.cart-items {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    flex-shrink: 0;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 5px;
}

.quantity-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 600;
}

.remove-btn {
    background: #cf2e2e;
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.remove-btn:hover {
    background: #b00c0c;
    transform: scale(1.05);
}

.cart-item-total {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    min-width: 100px;
    text-align: right;
}

.cart-summary {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    margin-top: 1rem;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
    margin-top: 1rem;
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart i {
    font-size: 5rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.empty-cart h2 {
    margin-bottom: 1rem;
}

.empty-cart p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

@media (max-width: 968px) {
    .cart-wrapper {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-image {
        width: 100%;
        height: 150px;
    }
    
    .cart-item-actions {
        flex-wrap: wrap;
    }
    
    .cart-item-total {
        text-align: left;
        width: 100%;
    }
}

/* Order Search Modal - Fixed Floating Style (outside navbar) */
.order-search-modal {
    display: none;
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    width: 280px;
    pointer-events: none;
}

.order-search-modal.active {
    display: block;
    pointer-events: auto;
}

/* Arrow pointer */
.order-search-modal::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 118px;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
    border-top: 2px solid #03a9f4;
    border-left: 2px solid #03a9f4;
    z-index: 100000;
}

.order-search-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(3, 169, 244, 0.25);
    border: 2px solid #03a9f4;
    padding: 12px;
}

.order-search-modal .modal-header {
    display: none;
}

.order-search-modal .modal-body {
    padding: 0;
}

.order-search-modal .search-form {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.order-search-modal .search-form .form-group {
    margin: 0;
    flex: 1;
}

.order-search-modal .search-form input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #03a9f4;
    border-radius: 25px;
    font-size: 13px;
    height: 38px;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    transition: all 0.3s ease;
}

.order-search-modal .search-form input::placeholder {
    color: #999;
}

.order-search-modal .search-form input:focus {
    border-color: #0288d1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.15);
}

.order-search-modal .search-form .btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #03a9f4 0%, #0288d1 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(3, 169, 244, 0.3);
}

.order-search-modal .search-form .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(3, 169, 244, 0.4);
}

.order-search-modal .search-form .btn i {
    font-size: 14px;
}

.order-search-modal .search-results {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    max-height: 200px;
    overflow-y: auto;
}

.order-search-modal .order-result {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    border: 1px solid #e0e0e0;
}

.order-result {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.result-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-info {
    margin-bottom: 1.5rem;
}

.info-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item:last-child {
    border-bottom: none;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-paid {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.total-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.result-items {
    margin-top: 1.5rem;
}

.result-items h4 {
    margin-bottom: 1rem;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 5px;
    overflow: hidden;
}

.items-table th,
.items-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.items-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.items-table tr:last-child td {
    border-bottom: none;
}

.search-error {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.search-error i {
    font-size: 3rem;
    color: #ffc107;
    margin-bottom: 1rem;
}

.search-error h3 {
    margin-bottom: 1rem;
}

.orders-list h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-item-card {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-item-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-item-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.order-item-details {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.order-item-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
