/* Стили для страницы корзины */

/* Шапка */
.catalog-header {
    width: 100%;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo a {
    font-size: 24px;
    font-weight: bold;
    color: #000000;
    text-decoration: none;
    text-transform: uppercase;
}

.header-menu {
    display: flex;
    gap: 30px;
}

.menu-item {
    color: #000000;
    text-decoration: none;
    font-size: 12px;
    transition: opacity 0.3s;
}

.menu-item:visited,
.menu-item:active,
.menu-item:focus {
    color: #000000;
}

.menu-item:hover {
    opacity: 0.7;
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    text-decoration: none;
}

.icon-link img,
.icon-link svg {
    width: 20px;
    height: 20px;
}

.icon-link svg path {
    stroke: #000000;
}

/* Счетчик корзины */
.cart-icon {
    position: relative;
}

.cart-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #000000;
    color: #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
    padding: 0;
    margin: 0;
}

/* Основной контейнер */
.cart-page {
    background-color: #ffffff;
    min-height: 100vh;
    font-family: 'Gramatika', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 40px 20px;
}

.cart-page .container {
    max-width: 1200px;
    margin: 0 auto;
}

.cart-title {
    font-size: 36px;
    font-weight: normal;
    color: #000000;
    margin-bottom: 40px;
    text-align: left;
}

/* Пустая корзина */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty p {
    font-size: 18px;
    color: #666666;
    margin-bottom: 30px;
}

.btn-back-to-catalog {
    display: inline-block;
    padding: 12px 30px;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.btn-back-to-catalog:hover {
    opacity: 0.8;
}

/* Таблица товаров */
.cart-table-wrapper {
    margin-bottom: 40px;
    overflow-x: auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
}

.cart-table thead {
    background-color: #f8f8f8;
}

.cart-table th {
    padding: 15px;
    text-align: left;
    font-size: 14px;
    font-weight: bold;
    color: #000000;
    border-bottom: 2px solid #000000;
    text-transform: uppercase;
}

.cart-table td {
    padding: 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.cart-table tbody tr:last-child td {
    border-bottom: none;
}

.cart-table tbody tr:hover {
    background-color: #fafafa;
}

.cart-item-name a {
    color: #000000;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s;
}

.cart-item-name a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.cart-item-metal,
.cart-item-weight,
.cart-item-size {
    font-size: 16px;
    color: #000000;
}

.cart-item-price {
    font-size: 16px;
    font-weight: bold;
    color: #000000;
}

.cart-item-remove-cell {
    text-align: center;
    width: 50px;
}

.cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.cart-item-remove:hover {
    opacity: 0.7;
}

.cart-item-remove svg {
    width: 20px;
    height: 20px;
}

/* Резюме */
.cart-summary {
    margin-bottom: 40px;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.cart-summary p {
    font-size: 16px;
    color: #000000;
    margin: 0;
}

.cart-summary strong {
    font-weight: bold;
}

/* Поле для сертификата */
.cart-certificate {
    margin-bottom: 40px;
    padding: 20px 0;
}

.certificate-label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 10px;
}

.certificate-input-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.certificate-input {
    flex: 1;
    max-width: 400px;
    padding: 12px 15px;
    border: 1px solid #000000;
    font-size: 16px;
    color: #000000;
    background-color: #ffffff;
}

.certificate-input:focus {
    outline: none;
    border-color: #000000;
}

.certificate-input::placeholder {
    color: #999999;
}

.btn-apply-certificate {
    padding: 12px 30px;
    border: 1px solid #000000;
    background-color: #000000;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.btn-apply-certificate:hover {
    opacity: 0.8;
}

/* Блок оформления заказа */
.checkout-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #000000;
    width: 50%;
    max-width: 600px;
}

.checkout-title {
    font-size: 28px;
    font-weight: normal;
    color: #000000;
    margin-bottom: 30px;
}

.checkout-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 30px;
}

.checkout-block {
    padding: 30px;
    border: 1px solid #e0e0e0;
    background-color: #ffffff;
}

.checkout-block-title {
    font-size: 20px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 20px;
}

/* Стили для формы контактных данных */
.checkout-form {
    display: flex;
    flex-direction: column;
}

.contact-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-size: 14px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 8px;
}

.form-field .required {
    color: #d32f2f;
}

.form-field .wpcf7-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #000000;
    font-size: 16px;
    color: #000000;
    background-color: #ffffff;
    font-family: inherit;
}

.form-field .wpcf7-form-control:focus {
    outline: none;
    border-color: #000000;
}

.form-field .wpcf7-form-control::placeholder {
    color: #999999;
}

.form-field .wpcf7-form-control:invalid {
    border-color: #d32f2f;
}

/* Стили для Contact Form 7 (если используется) */
.checkout-block .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkout-block .wpcf7-form-control-wrap {
    display: block;
}

.checkout-block .wpcf7-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #000000;
    font-size: 16px;
    color: #000000;
    background-color: #ffffff;
    font-family: inherit;
}

.checkout-block .wpcf7-form-control:focus {
    outline: none;
    border-color: #000000;
}

.checkout-block .wpcf7-form-control::placeholder {
    color: #999999;
}

.checkout-block .wpcf7-textarea {
    resize: vertical;
    min-height: 100px;
}

.checkout-block .wpcf7-form-control.wpcf7-validates-as-required {
    border-color: #000000;
}

.checkout-block .wpcf7-not-valid-tip {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.checkout-block .wpcf7-validation-errors {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 10px;
}

.checkout-block .wpcf7-mail-sent-ok {
    color: #2e7d32;
    font-size: 14px;
    margin-top: 10px;
}

/* Доставка */
.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.delivery-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    border: 1px solid #e0e0e0;
    transition: border-color 0.3s, background-color 0.3s;
}

.delivery-option:hover {
    border-color: #000000;
    background-color: #fafafa;
}

.delivery-option input[type="radio"] {
    margin: 0;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.delivery-option input[type="radio"]:checked + .delivery-option-text {
    font-weight: bold;
}

.delivery-option:has(input[type="radio"]:checked) {
    border-color: #000000;
    background-color: #f8f8f8;
}

.delivery-option-text {
    font-size: 16px;
    color: #000000;
    line-height: 1.5;
    flex: 1;
}

/* Текст согласия */
.consent-text {
    font-size: 12px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.consent-text a {
    color: #000000;
    text-decoration: underline;
}

.consent-text a:hover {
    opacity: 0.7;
}

/* Чекбокс согласия */
.consent-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 30px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    transition: border-color 0.3s;
}

.consent-checkbox-label:hover {
    border-color: #000000;
}

.consent-checkbox-label input[type="checkbox"] {
    margin: 0;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.consent-checkbox-text {
    font-size: 14px;
    color: #000000;
    line-height: 1.5;
    flex: 1;
}

/* Кнопка "Продолжить" */
.btn-continue {
    width: 100%;
    max-width: 400px;
    padding: 16px 30px;
    background-color: #000000;
    color: #ffffff;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-continue:hover:not(:disabled) {
    opacity: 0.8;
}

.btn-continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Адаптивность */
@media (max-width: 768px) {
    .cart-page {
        padding: 20px 15px;
    }
    
    .cart-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .checkout-section {
        width: 100%;
        max-width: 100%;
    }
    
    .cart-table {
        font-size: 14px;
    }
    
    .cart-table th,
    .cart-table td {
        padding: 12px 8px;
    }
    
    .cart-table th {
        font-size: 12px;
    }
    
    .cart-item-name a,
    .cart-item-metal,
    .cart-item-weight,
    .cart-item-size,
    .cart-item-price {
        font-size: 14px;
    }
    
    .certificate-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .certificate-input {
        max-width: 100%;
    }
    
    .btn-apply-certificate {
        width: 100%;
    }
    
    .checkout-block {
        padding: 20px 15px;
    }
    
    .checkout-title {
        font-size: 24px;
    }
    
    .checkout-block-title {
        font-size: 18px;
    }
    
    .delivery-option-text {
        font-size: 14px;
    }
    
    .consent-text {
        font-size: 11px;
    }
    
    .consent-checkbox-text {
        font-size: 12px;
    }
    
    .btn-continue {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
    }
}
