/* Basket Page Styling - Minimal Design */

/* Page Container - Dark Background */
.basket-page-container {
    background: #363636;
    min-height: 100vh;
    padding: 2rem 0;
}

/* Basket Section - White Wrapper */
.basket-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Basket Title */
.basket-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 2rem 0;
}

/* Basket Layout: Two Columns */
.basket-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

/* Product List */
.basket-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Individual Basket Item */
.basket-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;  /* White background to match overall design */
}

.item-image {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 4px;
    position: relative;
}

.item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #ffffff;  /* White background to match placeholder */
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-title {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    text-decoration: none;
}

.item-title:hover {
    color: #f87b1e;
    text-decoration: underline;
}

.item-size {
    font-size: 0.875rem;
    color: #666;
}

/* Quantity Controls */
.item-quantity .quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.25rem;
}

.qty-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    background: #f5f5f5;
    color: #000;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.qty-input {
    width: 3rem;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
}

/* Price and Total */
.item-price,
.item-total {
    text-align: right;
}

.unit-price {
    font-size: 0.875rem;
    color: #666;
}

.line-total {
    font-size: 1.125rem;
    font-weight: 700;
    color: #000;
}

/* Remove Button */
.btn-remove {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: transparent;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    border-radius: 4px;
}

.btn-remove:hover {
    color: #ff5555;
    background: #ffe5e5;
}

/* Cart Summary Sidebar */
.basket-summary {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.basket-summary h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 1.5rem 0;
}

.basket-summary h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    margin: 1.5rem 0 1rem 0;
}

/* Summary Rows */
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95rem;
}

.summary-row span:first-child {
    color: #666;
}

.summary-row span:last-child {
    font-weight: 600;
    color: #000;
}

.summary-total {
    border-top: 2px solid #000;
    border-bottom: none;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.summary-total span {
    color: #000;
}

/* Delivery Methods */
.delivery-methods {
    margin: 1.5rem 0;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.delivery-option:hover {
    border-color: #f87b1e;
    background: #fff5ee;
}

.delivery-option input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #f87b1e;
}

.delivery-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.delivery-title {
    font-weight: 600;
    color: #000;
    font-size: 0.95rem;
}

.delivery-subtitle {
    font-size: 0.85rem;
    color: #666;
}

.delivery-price {
    font-weight: 700;
    color: #f87b1e;
    font-size: 1rem;
}

/* Checkout Button */
.btn-checkout {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #f87b1e;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 6px;
    margin-top: 1.5rem;
    transition: background 0.2s;
}

.btn-checkout:hover {
    background: #e06a0c;
    text-decoration: none;
}

.btn-continue-shopping {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    color: #f87b1e;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    margin-top: 0.75rem;
    transition: all 0.2s;
}

.btn-continue-shopping:hover {
    background: transparent;
    text-decoration: underline;
    color: #f87b1e;
}

/* Empty Basket State */
.empty-basket {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-basket i {
    font-size: 5rem;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
}

.empty-basket h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 0.5rem;
}

.empty-basket p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.empty-basket .btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #f87b1e;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.2s;
}

.empty-basket .btn:hover {
    background: #e06a0c;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .basket-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .basket-summary {
        position: static;
    }

    .basket-item {
        grid-template-columns: 80px 1fr auto;
        gap: 1rem;
    }

    .item-image {
        width: 80px;
        height: 80px;
    }

    .item-quantity,
    .item-price {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 0.5rem;
    }

    .item-total {
        grid-column: 1 / -1;
        justify-self: end;
    }

    .item-remove {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .basket-item {
        position: relative;
    }
}

@media (max-width: 768px) {
    .basket-page-container {
        padding: 1rem 0;
    }

    .basket-section {
        padding: 1.5rem;
    }

    .basket-title {
        font-size: 1.5rem;
    }

    .delivery-option {
        padding: 0.75rem;
    }

    .delivery-title {
        font-size: 0.875rem;
    }

    .delivery-subtitle {
        font-size: 0.8rem;
    }
}

/* Campaign icons in basket - smaller size for compact layout */
.campaign-icon-basket {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 15;
}

.campaign-icon-basket .campaign-icon {
    width: 35px;
    height: 35px;
    background: transparent !important;
}

.campaign-icon-basket .campaign-tooltip {
    width: 200px;
    font-size: 0.8rem;
}

@media (max-width: 1024px) {
    .campaign-icon-basket .campaign-icon {
        width: 30px;
        height: 30px;
    }
}

/* Quantity Validation Error Styles */
.basket-validation-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
    animation: fadeSlideIn 0.25s ease-out;
}

.line-quantity-error {
    grid-column: 1 / -1;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    animation: fadeSlideIn 0.25s ease-out;
}

.basket-item.has-quantity-error {
    border-color: #ffc107;
    background: #fffcf5;
    transition: border-color 0.2s ease, background 0.2s ease;
}

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

/* Responsive adjustments for error messages */
@media (max-width: 768px) {
    .line-quantity-error {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .basket-validation-error {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}
