/* Cart Page Styles */
.cart-page {
    padding: 2rem 0;
}

/* ================================
   Status Badge (Customer Pages)
   ================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.large {
    padding: 0.5rem 1rem;
    font-size: 14px;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-confirmed,
.status-processing {
    background: rgba(26, 86, 219, 0.1);
    color: var(--primary);
}

.status-shipped {
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

.status-delivered,
.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ================================
   Track Order Page
   ================================ */

.track-search-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    margin-bottom: 2rem;
}

.track-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.track-input-group {
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.track-input-group:focus-within {
    border-color: var(--primary);
    background: var(--white);
}

.track-input-group svg {
    color: var(--gray-400);
    flex-shrink: 0;
}

.track-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
}

.track-form .btn {
    padding: 0.875rem 1.5rem;
}

/* Track Result */
.track-result {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    margin-bottom: 2rem;
}

.track-not-found {
    text-align: center;
    padding: 3rem 2rem;
}

.not-found-icon {
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.track-not-found h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.track-not-found p {
    color: var(--gray-500);
    margin: 0.25rem 0;
}

/* Track Order Header */
.track-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.track-order-info h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.track-order-info p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Track Timeline */
.track-timeline {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    position: relative;
}

.track-timeline::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--gray-200);
}

.track-timeline .timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.track-timeline .timeline-icon {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--gray-400);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--gray-200);
}

.track-timeline .timeline-item.completed .timeline-icon {
    background: var(--success);
    color: var(--white);
    box-shadow: 0 0 0 2px var(--success);
}

.track-timeline .timeline-item.cancelled .timeline-icon {
    background: var(--danger);
    color: var(--white);
    box-shadow: 0 0 0 2px var(--danger);
}

.track-timeline .timeline-content strong {
    font-size: 0.75rem;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--gray-600);
}

.track-timeline .timeline-content small {
    font-size: 0.7rem;
    color: var(--gray-400);
}

.track-timeline .timeline-item.completed .timeline-content strong {
    color: var(--gray-800);
}

@media (max-width: 768px) {
    .track-timeline {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .track-timeline::before {
        top: 20px;
        bottom: 20px;
        left: 19px;
        right: auto;
        width: 2px;
        height: auto;
    }

    .track-timeline .timeline-item {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
    }

    .track-timeline .timeline-icon {
        margin-bottom: 0;
    }
}

/* Track Details Grid */
.track-details-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .track-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.track-detail-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.track-detail-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.track-detail-card h3 svg {
    color: var(--primary);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--gray-200);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.total {
    border-top: 1px solid var(--gray-300);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-weight: 600;
}

.detail-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.detail-value {
    color: var(--gray-800);
    font-size: 0.875rem;
    text-align: right;
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

/* Track Items Card */
.track-items-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.track-items-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.track-items-card h3 svg {
    color: var(--primary);
}

.track-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--white);
    border-radius: var(--radius);
}

.track-item-image {
    width: 50px;
    height: 50px;
    background: var(--gray-100);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.track-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.track-item-image svg {
    color: var(--gray-400);
}

.track-item-info {
    flex: 1;
    min-width: 0;
}

.track-item-info h4 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-item-info p {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.track-item-subtotal {
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

/* Track Actions */
.track-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Track Info Cards (Initial State) */
.track-info-cards {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .track-info-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.track-info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.track-info-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.track-info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.track-info-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* Track Help */
.track-help {
    text-align: center;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.track-help h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.track-help p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.cart-page .page-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.cart-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .cart-grid {
        grid-template-columns: 1fr 360px;
    }
}

.cart-items {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    background: var(--gray-50);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-image img {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--gray-100);
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
    padding: 0.5rem;
}

.qty-input:focus {
    outline: none;
}

.remove-btn {
    color: var(--gray-400);
    padding: 0.5rem;
    transition: var(--transition);
}

.remove-btn:hover {
    color: var(--danger);
}

.cart-summary {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: var(--gray-600);
}

.summary-row.total {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    margin-top: 1rem;
}

/* Checkout Page */
.checkout-page {
    padding: 2rem 0;
}

.checkout-page .page-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.checkout-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr 400px;
    }
}

.checkout-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.checkout-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    padding: 1.5rem;
}

.checkout-section .section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-800);
}

.checkout-section .section-title svg {
    color: var(--primary);
}

/* Checkout Form Styles */
.checkout-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .checkout-form .form-row {
        grid-template-columns: 1fr;
    }
}

.checkout-form .form-group {
    margin-bottom: 1rem;
}

.checkout-form .form-group:last-child {
    margin-bottom: 0;
}

.checkout-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.checkout-form input[type="text"],
.checkout-form input[type="tel"],
.checkout-form input[type="email"],
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.checkout-form input::placeholder,
.checkout-form textarea::placeholder {
    color: var(--gray-400);
}

.checkout-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.checkout-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .payment-methods {
        grid-template-columns: 1fr;
    }
}

.payment-option {
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    height: 100%;
    background: var(--white);
}

.payment-card svg {
    color: var(--gray-400);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.payment-card div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.payment-card strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.payment-card small {
    font-size: 12px;
    color: var(--gray-500);
}

.payment-option input[type="radio"]:checked+.payment-card {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.payment-option input[type="radio"]:checked+.payment-card svg {
    color: var(--primary);
}

.payment-option:hover .payment-card {
    border-color: var(--gray-300);
}

/* Order Summary Sidebar */
.checkout-sidebar {
    height: fit-content;
}

.order-summary {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.order-summary .summary-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.order-items {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.order-items .order-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.order-items .order-item:first-child {
    padding-top: 0;
}

.order-items .order-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.order-item-image {
    position: relative;
    width: 56px;
    height: 56px;
    background: var(--gray-50);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-item-image img {
    max-width: 44px;
    max-height: 44px;
    object-fit: contain;
}

.order-item-image .qty-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-item-info {
    flex: 1;
    min-width: 0;
}

.order-item-info h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.order-item-info .price {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.summary-details {
    margin-bottom: 1rem;
}

.summary-details .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 14px;
    color: var(--gray-600);
}

.summary-details .summary-row.total {
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--gray-100);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.order-summary .btn-block {
    width: 100%;
    margin-bottom: 1rem;
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 12px;
    color: var(--gray-500);
}

.secure-note svg {
    color: var(--success);
}

/* Delivery Options (New) */
.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.delivery-option-wrapper {
    transition: all 0.3s ease;
}

.delivery-card {
    padding: 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    background: var(--white);
    cursor: pointer;
}

.delivery-card:hover {
    border-color: var(--gray-300);
}

.delivery-card.selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.03);
}

.delivery-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.delivery-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.delivery-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.delivery-info strong {
    font-size: 0.9375rem;
    color: var(--gray-800);
}

.delivery-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
}

.delivery-badge.free {
    background: #dcfce7;
    color: #166534;
}

.delivery-badge.paid {
    background: #fef3c7;
    color: #92400e;
}

.delivery-desc {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Input inside delivery card */
.delivery-input-inside {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--gray-200);
}

.delivery-input-inside select,
.delivery-input-inside input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--white);
    transition: var(--transition);
}

.delivery-input-inside select:focus,
.delivery-input-inside input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.delivery-input-inside select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.delivery-input-inside .form-hint {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.delivery-input-inside .form-hint svg {
    flex-shrink: 0;
    color: var(--primary);
}

.delivery-detail-section {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: -0.5rem;
}

.delivery-detail-section .form-group {
    margin-bottom: 0;
}

.form-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.checkout-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.delivery-options {
    display: grid;
    gap: 1rem;
}

.delivery-option {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.delivery-option:hover {
    border-color: var(--gray-300);
}

.delivery-option.selected {
    border-color: var(--primary);
    background: rgba(26, 86, 219, 0.05);
}

.delivery-option-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.delivery-option-header input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.delivery-option-title {
    font-weight: 500;
}

.delivery-option-price {
    margin-left: auto;
    font-weight: 600;
    color: var(--primary);
}

.delivery-option-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    display: none;
}

.delivery-option.selected .delivery-option-content {
    display: block;
}

.payment-options {
    display: grid;
    gap: 0.75rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.payment-option:hover {
    border-color: var(--gray-300);
}

.payment-option.selected {
    border-color: var(--primary);
    background: rgba(26, 86, 219, 0.05);
}

.payment-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.payment-icon {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-items-list {
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 60px;
    height: 60px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-item-image img {
    max-width: 50px;
    max-height: 50px;
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-weight: 500;
    font-size: 14px;
}

.order-item-qty {
    font-size: 13px;
    color: var(--gray-500);
}

.order-item-price {
    font-weight: 600;
}

/* Order Success Page */
.success-page {
    padding: 3rem 0;
    text-align: center;
}

.success-content {
    max-width: 720px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--success);
}

.success-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.success-message {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}


.success-order {
    margin: 1.5rem auto 0;
    padding: 1rem 0;
}

.success-order-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.success-order-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.success-order-value {
    display: inline-block;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: var(--radius);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--gray-800);
}

.btn-copy {
    gap: 0.5rem;
}

.btn-copy:disabled {
    opacity: 0.7;
    cursor: default;
}

.success-note {
    margin-top: 0.75rem;
    color: var(--gray-500);
    font-size: 13px;
}

.success-note a {
    color: var(--primary);
    font-weight: 500;
}

.success-meta {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    color: var(--gray-600);
    font-size: 13px;
}

.success-meta strong {
    color: var(--gray-800);
    font-weight: 600;
}

.success-meta .status-badge {
    margin-left: 0.25rem;
}

.success-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.success-actions .btn {
    min-height: 44px;
    line-height: 1;
}

/* Compensate outline border so button heights match */
.success-actions .btn.btn-outline {
    padding: calc(0.75rem - 1px) calc(1.5rem - 1px);
}

.success-actions .btn svg {
    flex-shrink: 0;
}

.success-details {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

/* Orders Page */
.orders-page {
    padding: 2rem 0;
}

.order-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 1.5rem;
}

.order-tabs .tab {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    color: var(--gray-600);
    background: var(--white);
    font-weight: 500;
    font-size: 13px;
}

.order-tabs .tab:hover {
    color: var(--gray-800);
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.order-tabs .tab.active {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.order-number {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 14px;
    line-height: 1.3;
}

.order-date {
    color: var(--gray-500);
    font-size: 13px;
}

.order-items-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.order-items-preview .preview-item {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.order-items-preview .preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.order-items-preview .preview-more {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    border: 1px dashed var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: var(--gray-50);
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
}

.order-total {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.order-total .label {
    color: var(--gray-500);
    font-size: 12px;
}

.order-total .value {
    font-weight: 700;
    color: var(--gray-800);
    font-size: 14px;
}

.order-actions {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.order-actions .btn {
    min-height: 36px;
    line-height: 1;
}

.order-actions .btn.btn-secondary,
.order-actions .btn.btn-outline {
    padding: calc(0.5rem - 1px) calc(1rem - 1px);
}

.order-card-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.order-card-number {
    font-weight: 600;
}

.order-card-date {
    color: var(--gray-500);
    font-size: 13px;
}

.order-card-body {
    padding: 1.5rem;
}

.order-card-items {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.order-card-item-img {
    width: 60px;
    height: 60px;
    background: var(--gray-50);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
}

.order-total {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Order Detail Page */
.order-detail-page {
    padding: 2rem 0;
}

.order-detail-page .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 1rem;
}

.order-detail-page .back-link:hover {
    color: var(--primary);
}

.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.order-detail-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.order-detail-header .order-number {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: var(--radius);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 700;
}

/* Detail timeline: override generic timeline styles with a cleaner stepper */
.order-detail-page .order-timeline {
    margin: 0 auto 2rem;
    padding: 1rem;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    background: var(--white);
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    overflow: hidden;
}

.order-detail-page .order-timeline::before {
    display: none;
}

.order-detail-page .timeline-item {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 0.75rem;
    margin: 0;
}

.order-detail-page .timeline-item::before {
    display: none;
}

.order-detail-page .timeline-item:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 18px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.order-detail-page .timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-600);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    margin-bottom: 0.5rem;
}

.order-detail-page .timeline-item.completed .timeline-icon {
    color: var(--success);
    background: var(--gray-50);
    border: 1px solid var(--success);
}

.order-detail-page .timeline-content strong {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.125rem;
}

.order-detail-page .timeline-content small {
    color: var(--gray-500);
    font-size: 13px;
}

.order-detail-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .order-detail-grid {
        grid-template-columns: 1fr 380px;
        align-items: start;
    }
}

.order-items-section,
.order-info-section {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.order-items-section .section-title,
.order-info-section .section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.order-summary-box {
    border-top: 1px solid var(--gray-100);
    padding-top: 1rem;
    margin-top: 1rem;
}

.order-summary-box .summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.375rem 0;
    color: var(--gray-700);
}

.order-summary-box .summary-row.total {
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--gray-100);
    font-weight: 700;
    color: var(--gray-900);
}

/* Order detail: tighten sidebar cards (override generic .info-card used by static pages) */
.order-detail-page .info-card,
.order-detail-page .action-card {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: none;
    margin-bottom: 1rem;
}

.order-detail-page .info-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.75rem;
}

.order-detail-page .info-card h3 svg {
    color: var(--gray-500);
}

.order-detail-page .info-content p {
    margin: 0.25rem 0;
    color: var(--gray-700);
}

.order-detail-page .help-text {
    margin: 0.5rem 0 0;
    color: var(--gray-500);
    font-size: 13px;
    text-align: center;
}

/* Order detail: match item markup in views/orders/detail.php */
.order-detail-page .order-items-list {
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    overflow: hidden;
}

.order-detail-page .order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.order-detail-page .order-item:last-child {
    border-bottom: none;
}

.order-detail-page .order-item .item-image {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.order-detail-page .order-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.order-detail-page .order-item .item-details {
    flex: 1;
    min-width: 0;
}

.order-detail-page .order-item .item-details h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-detail-page .order-item .item-meta {
    margin-top: 0.25rem;
    font-size: 13px;
    color: var(--gray-500);
}

.order-detail-page .order-item .item-subtotal {
    font-weight: 700;
    color: var(--gray-900);
    white-space: nowrap;
}

.order-detail-page .action-card .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (max-width: 575.98px) {
    .order-detail-page .order-item {
        align-items: flex-start;
    }

    .order-detail-page .order-item .item-details h4 {
        white-space: normal;
    }
}

/* Track Order */
.track-page {
    padding: 2rem 0;
}

.track-form {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.track-input-group {
    display: flex;
    gap: 0.5rem;
}

.track-input-group .form-control {
    flex: 1;
}

.order-timeline {
    max-width: 600px;
    margin: 0 auto;
    padding-left: 2rem;
    position: relative;
}

.order-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gray-200);
    border: 3px solid var(--white);
}

.timeline-item.completed::before {
    background: var(--success);
}

.timeline-item.active::before {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.2);
}

.timeline-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.timeline-time {
    font-size: 13px;
    color: var(--gray-500);
}

/* Auth Pages - Modern Clean Design */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    padding: 40px 36px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    margin-bottom: 20px;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.auth-header p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.auth-form .input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-form .input-icon svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

.auth-form .input-icon input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.auth-form .input-icon input::placeholder {
    color: #9ca3af;
}

.auth-form .input-icon input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-form .input-icon input:focus+svg,
.auth-form .input-icon:focus-within svg:first-of-type {
    color: #3b82f6;
}

.auth-form .toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.auth-form .toggle-password:hover {
    color: #64748b;
}

.auth-form .toggle-password svg {
    position: static;
    width: 18px;
    height: 18px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #4b5563;
    font-size: 13px;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: #3b82f6;
}

.forgot-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.auth-form .btn-primary {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    background: #3b82f6;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-form .btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.auth-footer p {
    color: #64748b;
    font-size: 14px;
}

.auth-footer a {
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
}

.auth-footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Auth Alert Styles */
.auth-page .alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-page .alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-page .alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.auth-page .error-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.auth-page .error-list li {
    margin-bottom: 4px;
}

.auth-page .error-list li:last-child {
    margin-bottom: 0;
}

/* Terms checkbox styling */
.auth-form .form-group .checkbox-label span {
    line-height: 1.4;
}

.auth-form .form-group .checkbox-label a {
    color: #3b82f6;
    text-decoration: none;
}

.auth-form .form-group .checkbox-label a:hover {
    text-decoration: underline;
}

/* Product Detail Page */
.product-detail {
    padding: 2rem 0;
}

.product-detail-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.product-gallery {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.product-gallery img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.product-detail-info {
    padding: 1rem 0;
}

.product-detail-category {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.product-detail-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
}

.product-detail-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.product-detail-price {
    margin-bottom: 1.5rem;
}

.product-detail-price .price-current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.product-detail-price .price-old {
    font-size: 1.25rem;
    margin-left: 0.75rem;
}

.product-detail-desc {
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stock-available {
    color: var(--success);
}

.stock-low {
    color: var(--warning);
}

.stock-out {
    color: var(--danger);
}

.product-actions-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-actions-form .qty-control {
    flex-shrink: 0;
}

.product-actions-form .btn {
    flex: 1;
    min-width: 200px;
}

/* Products Page */
.products-page {
    padding: 2rem 0;
}

/* Products Search Bar */
.products-search-bar {
    margin-bottom: 1.5rem;
}

.products-search-form {
    display: flex;
    align-items: center;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.products-search-form:focus-within {
    border-color: var(--primary);
    background: var(--white);
}

.products-search-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
}

.products-search-input:focus {
    outline: none;
}

.products-search-btn {
    padding: 0.875rem 1rem;
    color: var(--gray-500);
    transition: var(--transition);
}

.products-search-btn:hover {
    color: var(--primary);
}

.products-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.products-count {
    color: var(--gray-500);
}

.products-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.products-layout {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .products-layout {
        grid-template-columns: 240px 1fr;
    }
}

.products-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .products-sidebar {
        display: block;
    }
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--gray-600);
}

.category-link:hover,
.category-link.active {
    color: var(--primary);
}

.category-count {
    font-size: 13px;
    color: var(--gray-400);
}

/* ================================
   Static Pages (Cara Belanja, Kebijakan, FAQ)
   ================================ */

.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
}

.page-content {
    padding: 3rem 0;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.info-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.info-card-highlight {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

/* Step List */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--gray-800);
}

.step-content p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Tips List */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tips-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-700);
}

.tips-list svg {
    color: var(--success);
    flex-shrink: 0;
}

/* Policy Sections */
.policy-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.policy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.policy-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
}

.policy-section h3 svg {
    color: var(--primary);
}

.policy-list {
    margin-left: 1.5rem;
}

.policy-list li {
    padding: 0.375rem 0;
    color: var(--gray-600);
    position: relative;
}

.policy-list li::before {
    content: '•';
    position: absolute;
    left: -1rem;
    color: var(--success);
    font-weight: bold;
}

.policy-list-red li::before {
    color: var(--danger);
}

/* Notes List */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notes-list li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: var(--gray-700);
    position: relative;
}

.notes-list li::before {
    content: '!';
    position: absolute;
    left: 0;
    width: 18px;
    height: 18px;
    background: var(--warning);
    color: var(--white);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Page CTA */
.page-cta {
    text-align: center;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-top: 2rem;
}

.page-cta h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-cta p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* FAQ Page */
.faq-contact-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .faq-contact-grid {
        grid-template-columns: 1fr 400px;
        align-items: start;
    }
}

.faq-section h2,
.contact-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 500;
    color: var(--gray-800);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--gray-50);
}

.faq-question svg {
    color: var(--gray-400);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.25rem 1.25rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.faq-answer a {
    color: var(--primary);
    text-decoration: underline;
}

/* Contact Card */
.contact-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    position: sticky;
    top: 100px;
}

.contact-card>p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-method.whatsapp {
    background: #dcfce7;
    color: #166534;
}

.contact-method.whatsapp:hover {
    background: #bbf7d0;
}

.contact-method.email {
    background: #dbeafe;
    color: #1e40af;
}

.contact-method.email:hover {
    background: #bfdbfe;
}

.contact-method.location {
    background: var(--gray-100);
    color: var(--gray-700);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 12px;
    opacity: 0.8;
}

.contact-value {
    font-weight: 600;
}

.contact-hours {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.contact-hours h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.contact-hours p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0.25rem 0;
}

.btn-whatsapp {
    background: #25d366;
    color: var(--white);
}

.btn-whatsapp:hover {
    background: #128c7e;
}

.btn-full {
    width: 100%;
}

/* ==========================================
   COMPREHENSIVE RESPONSIVE MEDIA QUERIES
   FOR ALL PAGES
   ========================================== */

/* Global page responsive fixes */
@media (max-width: 575.98px) {

    /* Cart Page */
    .cart-page {
        padding: 1rem 0;
    }

    .cart-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cart-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-title {
        font-size: 13px;
    }

    .cart-item-price {
        font-size: 13px;
    }

    .cart-qty-input {
        width: 36px;
        height: 32px;
        font-size: 13px;
    }

    .cart-summary {
        padding: 1rem;
    }

    /* Checkout Page */
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .checkout-section {
        padding: 1rem;
    }

    .checkout-section h3 {
        font-size: 1rem;
    }

    /* Orders Page */
    .orders-list {
        gap: 1rem;
    }

    .order-card {
        padding: 1rem;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .order-number {
        font-size: 13px;
    }

    .order-items {
        gap: 0.75rem;
    }

    .order-item-image {
        width: 50px;
        height: 50px;
    }

    .order-item-name {
        font-size: 13px;
    }

    .order-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .order-total {
        text-align: left;
    }

    .order-actions {
        justify-content: flex-start;
    }

    /* Track Order */
    .track-search-card {
        padding: 1rem;
    }

    .track-form {
        flex-direction: column;
    }

    .track-input-group {
        min-width: 100%;
    }

    .track-result {
        padding: 1rem;
    }

    .track-order-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .track-order-info h2 {
        font-size: 1rem;
    }

    /* Track Timeline - Vertical on mobile */
    .track-timeline {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    .track-timeline::before {
        top: 20px;
        bottom: 20px;
        left: 19px;
        right: auto;
        width: 2px;
        height: auto;
    }

    .track-timeline .timeline-item {
        flex-direction: row;
        text-align: left;
        padding: 0.75rem 0;
        gap: 1rem;
    }

    .track-timeline .timeline-icon {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .track-timeline .timeline-label {
        font-size: 13px;
    }

    /* Order Items on Track */
    .track-order-items {
        gap: 0.75rem;
    }

    .track-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .track-item-image {
        width: 50px;
        height: 50px;
    }

    /* Product Detail Page */
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-gallery {
        max-height: 300px;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .product-price-main {
        font-size: 1.25rem;
    }

    .product-actions-wrap {
        flex-direction: column;
        gap: 0.75rem;
    }

    .product-actions-wrap .btn {
        width: 100%;
    }

    /* Related Products */
    .related-products {
        padding: 1.5rem 0;
    }

    .related-title {
        font-size: 1.125rem;
    }

    /* Product List Page */
    .products-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .products-filter {
        width: 100%;
    }

    .products-sort {
        width: 100%;
    }

    .products-filter-btn {
        width: 100%;
        justify-content: center;
    }

    /* Search Page */
    .search-header {
        padding: 1rem 0;
    }

    .search-input-large {
        font-size: 14px;
        padding: 0.75rem 1rem;
    }

    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Auth Pages */
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .auth-title {
        font-size: 1.25rem;
    }

    /* Info Pages (FAQ, Kebijakan, etc) */
    .info-page {
        padding: 1rem 0;
    }

    .info-page-title {
        font-size: 1.375rem;
    }

    .faq-item {
        padding: 0.75rem;
    }

    .faq-question {
        font-size: 14px;
    }

    .faq-answer {
        font-size: 13px;
    }

    /* Accordion */
    .accordion-header {
        padding: 0.75rem;
        font-size: 14px;
    }

    .accordion-body {
        padding: 0.75rem;
        font-size: 13px;
    }

    /* Success Page */
    .success-page {
        padding: 2rem 1rem;
    }

    .success-icon {
        width: 60px;
        height: 60px;
    }

    .success-title {
        font-size: 1.25rem;
    }

    .success-order-value {
        font-size: 1rem;
    }

    .success-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .success-actions .btn {
        width: 100%;
    }
}

/* Small tablets (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {

    .cart-page,
    .checkout-page,
    .orders-page {
        padding: 1.5rem 0;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .track-timeline .timeline-icon {
        width: 36px;
        height: 36px;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .order-card {
        padding: 1.25rem;
    }
}

/* Tablets (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .track-timeline {
        padding: 1.5rem 1rem;
    }

    .track-timeline::before {
        left: 30px;
        right: 30px;
    }
}

/* Large tablets / small desktops (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .cart-grid {
        grid-template-columns: 1fr 350px;
    }

    .checkout-grid {
        grid-template-columns: 1fr 350px;
    }
}

/* Large desktops (1200px and up) */
@media (min-width: 1200px) {
    .cart-grid {
        grid-template-columns: 1fr 400px;
    }

    .checkout-grid {
        grid-template-columns: 1fr 400px;
    }

    .product-detail-grid {
        grid-template-columns: 500px 1fr;
    }
}

/* Fix for any overflow issues globally */
@media (max-width: 767.98px) {

    html,
    body {
        overflow-x: hidden;
    }

    .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    pre,
    code {
        word-wrap: break-word;
        white-space: pre-wrap;
    }
}