/* cart.php — винесено з inline <style> 20260908_2104 */
:root {
    --blank-blue: #4A90E2;
    --blank-green: #007A35;
    --blank-orange: #f97316;
    --blank-orange-hover: #ea580c;
    --blank-price: #d4540a;
    --white: #ffffff;
    --black: #1f2937;
    --text-gray: #666;
    --light-gray: #f8f9fa;
}

.cart-page {
    min-height: 80vh;
    padding: 40px 0;
    background: var(--light-gray);
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.return-btn {
    background: var(--blank-orange);
    color: var(--white);
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Arial', sans-serif;
}

.return-btn:hover {
    background: var(--blank-orange-hover);
    transform: translateY(-2px);
    color: var(--white);
}

.cart-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.cart-content {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.cart-items {
    padding: 30px;
    margin-bottom: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.item-image {
    width: 100px;
    height: 133px;
    background: var(--light-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.item-placeholder {
    background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 2.5rem;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.item-name:hover {
    color: var(--blank-blue);
    text-decoration: none;
}

.item-size-price {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.item-size {
    font-size: 14px;
    color: var(--blank-blue);
    font-weight: 500;
}

.item-price-inline {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
}

.item-details-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.remove-btn {
    background: none;
    color: #dc3545;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.remove-btn:hover {
    color: #c82333;
    transform: scale(1.05);
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--light-gray);
    border-radius: 8px;
    padding: 5px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--blank-green);
    color: var(--white);
}

.quantity-input {
    width: 60px;
    height: 35px;
    border: none;
    background: var(--white);
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input:focus {
    outline: none;
    border: 1px solid var(--blank-green);
}

.item-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--black);
    text-align: center;
    min-width: 100px;
}

.cart-summary {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.summary-row:last-child {
    font-weight: 700;
    font-size: 18px;
    border-top: 2px solid var(--blank-green);
    padding-top: 15px;
    margin-top: 15px;
    margin-bottom: 0;
}

.free-shipping-notice {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    color: #2e7d32;
    font-weight: 500;
    text-align: center;
    font-size: 14px;
}

.order-form {
    margin-top: 20px;
    padding-top: 15px;
}

.order-form h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--black);
    text-align: center;
}

.simple-order-form {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--black);
    font-size: 1rem;
}

.form-label .required {
    color: #ef4444;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--blank-green);
    box-shadow: 0 0 0 3px rgba(0, 122, 53, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, var(--blank-green), #005a28);
    color: var(--white);
    border: none;
    padding: 18px 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 30px auto 0;
    box-shadow: 0 4px 15px rgba(0, 122, 53, 0.3);
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 53, 0.4);
}

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

.continue-btn {
    background: var(--blank-orange);
    color: var(--white);
    border: none;
    padding: 18px 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 15px auto 0;
    width: 100%;
}

.continue-btn:hover {
    background: var(--blank-orange-hover);
    transform: translateY(-2px);
}

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

.order-note {
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-gray);
    text-align: center;
    line-height: 1.6;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.empty-cart h2 {
    margin-bottom: 15px;
    color: var(--text-gray);
    font-size: 1.8rem;
}

.empty-cart p {
    color: var(--text-gray);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.loading-cart {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
}

.image-loading {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.image-loaded {
    opacity: 1;
}

@media (max-width: 768px) {
    .cart-page {
        padding: 20px 0;
    }

    .cart-container {
        padding: 2px;
    }

    .cart-content {
        margin: 20px 0;
    }

    .cart-items {
        padding: 20px;
    }

    .cart-item {
        display: grid;
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 15px;
        padding: 20px 0;
        grid-template-areas:
            "image info"
            "quantity total";
    }

    .cart-item .item-image {
        grid-area: image;
        width: 80px;
        height: 107px;
    }

    .cart-item .item-info {
        grid-area: info;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .cart-item .item-name {
        font-size: 16px;
    }

    .cart-item .item-size-price {
        gap: 12px;
        font-size: 14px;
    }

    .cart-item .quantity-control {
        grid-area: quantity;
        justify-self: start;
        align-self: center;
    }

    .cart-item .item-total {
        grid-area: total;
        justify-self: end;
        align-self: center;
        text-align: right;
        font-size: 18px;
    }

    .order-form h2 {
        font-size: 1.4rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .simple-order-form {
        max-width: 100%;
        padding: 0 10px;
    }

    .form-input {
        padding: 12px 15px;
        font-size: 16px;
    }

    .submit-btn,
    .continue-btn {
        font-size: 16px;
        padding: 14px 25px;
        white-space: nowrap;
    }

    .cart-summary {
        margin: 20px 0;
        padding: 20px;
    }
}
