/**
 * Cart, Checkout and Account Pages Styles
 */

/* Container для страниц корзины, оформления и аккаунта */
.woocommerce-cart .container,
.woocommerce-checkout .container,
.woocommerce-account .container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Cart Table Styles */
.woocommerce-cart-form {
    margin-bottom: 2rem;
}

.woocommerce table.shop_table {
    border: none;
    border-radius: 0;
    overflow: visible;
    border-collapse: separate;
    border-spacing: 0 1rem;
}

.woocommerce table.shop_table thead {
    background-color: #f7f7f7;
}

.woocommerce table.shop_table thead th {
    padding: 1rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

.woocommerce table.shop_table tbody td {
    padding: 1.5rem;
    border: none;
    vertical-align: middle;
    background: #fff;
}

.woocommerce table.shop_table tbody tr {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.woocommerce table.shop_table tbody tr:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.woocommerce table.shop_table tbody tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.woocommerce table.shop_table tbody tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.woocommerce table.shop_table tbody tr:last-child td {
    border-bottom: none;
}

/* Product Thumbnail */
.woocommerce table.shop_table .product-thumbnail img {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Product Name */
.woocommerce table.shop_table .product-name a {
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 0.5rem;
}

.woocommerce table.shop_table .product-name a:hover {
    color: #0693e3;
}

/* Product Price */
.woocommerce table.shop_table .product-price,
.woocommerce table.shop_table .product-subtotal {
    font-size: 1.2rem;
    font-weight: 700;
}

.woocommerce table.shop_table .product-price .amount,
.woocommerce table.shop_table .product-subtotal .amount {
    font-weight: 700;
}

/* Remove Button */
.woocommerce table.shop_table .product-remove a {
    color: #dc3545;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.3s ease;
}

.woocommerce table.shop_table .product-remove a:hover {
    opacity: 0.7;
}

/* Quantity Input */
.woocommerce table.shop_table .quantity input.qty {
    width: 100px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    transition: border-color 0.3s ease;
}

.woocommerce table.shop_table .quantity input.qty:focus {
    border-color: #0693e3;
    outline: none;
}

/* Cart Actions */
.woocommerce table.shop_table .actions {
    background-color: #f7f7f7;
    padding: 1.5rem !important;
}

.woocommerce table.shop_table .actions .coupon {
    display: inline-block;
    margin-right: 1rem;
}

.woocommerce table.shop_table .actions input[type="text"] {
    padding: 0.6rem 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-right: 0.5rem;
}

/* Cart Totals */
.cart-collaterals {
    margin-top: 2rem;
}

.woocommerce .cart-collaterals .cart_totals {
    float: right;
    width: 100%;
    max-width: 400px;
}

.woocommerce .cart-collaterals .cart_totals h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.woocommerce .cart-collaterals table.shop_table {
    background-color: #f9f9f9;
}

/* Checkout Styles */
.woocommerce-checkout .col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    width: 100%;
}

.woocommerce form .form-row {
    margin-bottom: 1rem;
}

.woocommerce form .form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    border-color: #0693e3;
    outline: none;
}

/* Order Review */
#order_review_heading {
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.woocommerce-checkout-review-order {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
}

/* My Account Styles */
.woocommerce-account .container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    background-color: #f7f7f7;
    padding: 1.5rem;
    border-radius: 8px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin-bottom: 0.5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background-color: #0693e3;
    color: #fff;
}

.woocommerce-account .woocommerce-MyAccount-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
}

/* Responsive Styles */
@media (max-width: 768px) {

    .woocommerce-cart .container,
    .woocommerce-checkout .container,
    .woocommerce-account .container {
        padding: 1rem;
        margin: 1rem;
    }

    .woocommerce table.shop_table thead {
        display: none;
    }

    .woocommerce table.shop_table tbody tr {
        display: block;
        margin-bottom: 1.5rem;
        border: none;
        border-radius: 12px;
        padding: 1.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .woocommerce table.shop_table tbody td {
        display: block;
        text-align: right;
        padding: 0.75rem 0;
        border: none;
        background: transparent;
    }

    .woocommerce table.shop_table tbody td::before {
        content: attr(data-title) ": ";
        float: left;
        font-weight: 600;
    }

    .woocommerce table.shop_table .product-thumbnail {
        text-align: center;
    }

    .woocommerce table.shop_table .product-thumbnail::before {
        display: none;
    }

    .woocommerce table.shop_table .product-remove {
        text-align: center;
    }

    .woocommerce table.shop_table .product-remove::before {
        display: none;
    }

    .woocommerce .cart-collaterals .cart_totals {
        float: none;
        max-width: 100%;
    }

    .woocommerce-checkout .col2-set {
        grid-template-columns: 1fr;
    }

    .woocommerce-account .container {
        grid-template-columns: 1fr;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation {
        margin-bottom: 1rem;
    }
}

/* Buttons */
.woocommerce .button,
.woocommerce button.button {
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border: none;
}

.woocommerce .button:hover,
.woocommerce button.button:hover {
    opacity: 0.85;
}

/* Notices */
.woocommerce-notices-wrapper {
    margin-bottom: 1rem;
}

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.woocommerce-message {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.woocommerce-error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.woocommerce-info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}