/* ============================================================
   BASKET PAGE STYLES - Mobile First Responsive Design
   ============================================================ */

.basket-page-section {
    padding: 2rem 1rem;
    background-color: var(--gym-bg-primary, #1a1a1a);
    min-height: calc(100vh - 200px);
    width: 100vw;
    align-self: stretch;
}

@media (min-width: 768px) {
    .basket-page-section {
        padding: 3rem 2rem;
    }
}

.basket-page-header {
    margin-bottom: 2rem;
}

.basket-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gym-orange, #d85517);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    text-align: center;
}

@media (min-width: 768px) {
    .basket-page-title {
        font-size: 2rem;
        text-align: center;
    }
}

/* ============================================================
   EMPTY BASKET STATE
   ============================================================ */

.basket-empty {
    text-align: center;
    padding: 2rem 2rem;
    height:57vh;
}

.basket-empty i {
    font-size: 4rem;
    color: var(--gym-orange, #d85517);
    opacity: 0.4;
    margin-bottom: 1.5rem;
    display: block;
}

.basket-empty h3 {
    font-size: 1.5rem;
    color: var(--gym-white, #fff);
    margin-bottom: 0.5rem;
}

.basket-empty p {
    color: var(--gym-text-muted, #888);
    margin-bottom: 2rem;
}

.btn-browse-products {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gym-orange, #d85517);
    color: var(--gym-white, #fff);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 48px;
}

.btn-browse-products:hover {
    background: #e86a2c;
    color: var(--gym-white, #fff);
}

/* ============================================================
   BASKET ITEMS LIST
   ============================================================ */

.basket-items-list {
    display: flex;
    flex-direction: column;
    justify-content:center;
    
    gap: 1rem;
    max-width: 900px;
}

.basket-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    background: var(--gym-bg-secondary, #242424);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    transition: box-shadow 0.3s ease;
}

@media (min-width: 576px) {
    .basket-item {
        grid-template-columns: 1fr auto auto auto;
        padding: 1.25rem 1.5rem;
    }
}

.basket-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.basket-item-info {
    min-width: 0;
}

.basket-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gym-white, #fff);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.basket-item-price {
    font-size: 0.8rem;
    color: var(--gym-text-muted, #888);
}

/* Quantity Controls */
.basket-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.basket-qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gym-border, #444);
    background: transparent;
    color: var(--gym-white, #fff);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.basket-qty-btn:hover {
    background: var(--gym-orange, #d85517);
    border-color: var(--gym-orange, #d85517);
}

.basket-qty-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gym-white, #fff);
    min-width: 28px;
    text-align: center;
}

/* Subtotal */
.basket-item-subtotal {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gym-orange, #d85517);
    white-space: nowrap;
}

/* Remove Button */
.basket-item-remove {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--gym-text-muted, #666);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.basket-item-remove:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

/* ============================================================
   BASKET SUMMARY
   ============================================================ */

.basket-summary {
    max-width: 900px;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gym-bg-secondary, #242424);
    border-radius: 10px;
    border: 1px solid var(--gym-border, #333);
}

.basket-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--gym-text-muted, #aaa);
    font-size: 1rem;
}

.basket-summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gym-white, #fff);
    border-top: 1px solid var(--gym-border, #444);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.basket-summary-total span:last-child {
    color: var(--gym-orange, #d85517);
    font-size: 1.5rem;
}

.btn-place-order {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--gym-orange, #d85517);
    color: var(--gym-white, #fff);
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    min-height: 56px;
}

.btn-place-order:hover {
    background: #e86a2c;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(216, 85, 23, 0.3);
}

.btn-place-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-continue-shopping {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: var(--gym-text-muted, #888);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 0.75rem;
    transition: color 0.3s ease;
}

.btn-continue-shopping:hover {
    color: var(--gym-orange, #d85517);
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */

.basket-loading {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.basket-loading-content {
    text-align: center;
    color: var(--gym-white, #fff);
}

.basket-loading-content i {
    font-size: 3rem;
    color: var(--gym-orange, #d85517);
    margin-bottom: 1rem;
}

.basket-loading-content p {
    font-size: 1.125rem;
    font-weight: 600;
}

/* ============================================================
   ORDER CONFIRMATION
   ============================================================ */

.order-confirmation {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.order-confirmation-icon {
    margin-bottom: 1.5rem;
}

.order-confirmation-icon i {
    font-size: 5rem;
    color: #28a745;
}

.order-confirmation-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gym-white, #fff);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .order-confirmation-title {
        font-size: 2.25rem;
    }
}

.order-confirmation-message {
    font-size: 1.125rem;
    color: var(--gym-text-muted, #aaa);
    margin-bottom: 0.5rem;
}

.order-confirmation-message strong {
    color: var(--gym-orange, #d85517);
}

.order-confirmation-note {
    font-size: 1rem;
    color: var(--gym-text-muted, #888);
    margin-bottom: 2.5rem;
}

.order-confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 576px) {
    .order-confirmation-actions {
        flex-direction: row;
        justify-content: center;
    }
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--gym-text-muted, #888);
    border: 1px solid var(--gym-border, #444);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 48px;
}

.btn-back-home:hover {
    color: var(--gym-white, #fff);
    border-color: var(--gym-white, #fff);
}

/* ============================================================
   ERROR TOAST
   ============================================================ */

.basket-toast-error {
    background: #e74c3c !important;
}

.basket-container {
    display: flex;
    justify-content: center;
    align-content: center;
    flex-direction: column;
  
}

#basketItems {
    justify-self:center;
    align-self: center;
}

/* ============================================================
   DISCOUNT BANNER
   ============================================================ */

.basket-discount-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
    max-width: 700px;
    align-self: center;
    width: 100%;
}

.basket-discount-banner i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.basket-discount-banner div {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.basket-discount-banner strong {
    font-size: 0.9rem;
}

.basket-discount-banner span {
    font-size: 0.8rem;
    opacity: 0.85;
}

.basket-discount-banner a {
    color: #d85517;
    text-decoration: underline;
    font-weight: 600;
}

.basket-discount-active {
    background: rgba(5, 150, 105, 0.12);
    border-color: rgba(5, 150, 105, 0.3);
    color: #34d399;
}

/* ============================================================
   GUEST CHECKOUT FORM
   ============================================================ */

.basket-guest-form {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    max-width: 700px;
    width: 100%;
    align-self: center;
}

.basket-guest-form-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.basket-guest-form-sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin: 0 0 1rem;
}

.basket-guest-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem;
}

@media (min-width: 576px) {
    .basket-guest-fields {
        grid-template-columns: 1fr 1fr;
    }

    .basket-guest-field:first-child {
        grid-column: 1 / -1;
    }
}

.basket-guest-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.375rem;
}

.basket-guest-field input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.basket-guest-field input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.basket-guest-field input:focus {
    border-color: #d85517;
    box-shadow: 0 0 0 3px rgba(216, 85, 23, 0.15);
}

/* ============================================================
   SUMMARY DISCOUNT ROW
   ============================================================ */

.basket-summary-discount {
    color: #34d399;
    font-weight: 600;
}