* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.form-container {
    max-width: 960px;
    width: 100%;
    background: #1e1e1e;
    padding: 36px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    border: 1px solid #2a2a2a;
}

h2 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 28px;
    letter-spacing: -0.5px;
    border-bottom: 2px solid #00d5e7;
    padding-bottom: 12px;
    display: inline-block;
}

.product-section {
    margin-bottom: 0;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.product-header label {
    font-weight: 500;
    font-size: 16px;
    color: #ccc;
    margin: 0;
}

.product-header .selected-name {
    color: #00d5e7;
    font-weight: 700;
    margin-left: 8px;
}

.toggle-btn {
    background: transparent;
    border: 2px solid #00d5e7;
    color: #00d5e7;
    padding: 6px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    transition: 0.25s;
    flex-shrink: 0;
}

.toggle-btn:hover {
    background: #00d5e7;
    color: #121212;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    transition: all 0.3s ease;
}

.product-grid.collapsed {
    max-height: 0 !important;
    padding: 0;
    margin: 0;
    gap: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.product-grid.expanded {
    max-height: 2000px;
    opacity: 1;
    padding-bottom: 16px;
}

.product-card {
    background: #252525;
    border-radius: 18px;
    padding: 16px 14px 18px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.product-card:hover {
    border-color: #00d5e7;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 213, 231, 0.15);
    z-index: 2;
}

.product-card.selected {
    border-color: #00d5e7;
    background: #1e3a3d;
    box-shadow: 0 0 0 3px rgba(0, 213, 231, 0.2);
    z-index: 2;
}

.product-card .select-btn {
    display: inline-block;
    padding: 4px 16px;
    background: transparent;
    border: 2px solid #00d5e7;
    color: #00d5e7;
    border-radius: 20px;
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: 0.25s;
    margin-left: 8px;
    flex-shrink: 0;
}

.product-card .select-btn:hover {
    background: #00d5e7;
    color: #121212;
}

.product-card.selected .select-btn {
    background: #00d5e7;
    color: #121212;
}

.product-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    border-radius: 14px;
    overflow: hidden;
    background: #1a1a1a;
    margin-bottom: 10px;
}

.product-gallery a {
    display: block;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.product-gallery a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.2s;
}

.product-gallery a:hover img {
    transform: scale(1.05);
}

.product-gallery a:first-child {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.product-name {
    font-weight: 500;
    font-size: 14px;
    color: #e0e0e0;
    margin: 6px 0 2px;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.product-price {
    font-weight: 700;
    font-size: 18px;
    color: #00d5e7;
}

.field-group {
    margin-bottom: 22px;
}

label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

label .required {
    color: #00d5e7;
    margin-left: 2px;
}

input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #333;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    background: #252525;
    color: #f0f0f0;
    transition: 0.25s;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: #00d5e7;
    box-shadow: 0 0 0 4px rgba(0, 213, 231, 0.12);
    background: #2a2a2a;
}

input::placeholder, textarea::placeholder {
    color: #666;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.delivery-options {
    display: flex;
    gap: 28px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.delivery-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    font-size: 16px;
    cursor: pointer;
    color: #d0d0d0;
}

.delivery-options input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #00d5e7;
    cursor: pointer;
}

#address-field {
    margin-top: 14px;
}

.contact-method {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
}

.contact-method label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    font-size: 16px;
    cursor: pointer;
    color: #d0d0d0;
}

.contact-method input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #00d5e7;
    cursor: pointer;
}

#contact-input {
    margin-top: 6px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 4px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    accent-color: #00d5e7;
    cursor: pointer;
    margin-top: 2px;
}

.checkbox-group label {
    font-weight: 400;
    font-size: 14px;
    color: #aaa;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-group label a {
    color: #00d5e7;
    text-decoration: none;
}

.checkbox-group label a:hover {
    text-decoration: underline;
}

.submit-btn {
    background: #00d5e7;
    color: #121212;
    border: none;
    padding: 16px 28px;
    border-radius: 40px;
    font-size: 18px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: 0.25s;
    letter-spacing: 0.5px;
    margin-top: 12px;
    box-shadow: 0 6px 20px rgba(0, 213, 231, 0.25);
}

.submit-btn:hover {
    background: #00e5f7;
    transform: scale(1.01);
    box-shadow: 0 8px 28px rgba(0, 213, 231, 0.4);
}

.footer-info {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-info p {
    color: #666;
    font-size: 13px;
}

.footer-info a {
    color: #00d5e7;
    text-decoration: none;
    transition: 0.2s;
}

.footer-info a:hover {
    color: #00e5f7;
    text-decoration: underline;
}

.hidden {
    display: none;
}

.error-border {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
}

.required-msg {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 400;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (min-width: 821px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 820px) and (min-width: 541px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .form-container {
        padding: 18px;
    }
    .footer-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ===== СТРАНИЦА ПОЛИТИКИ ===== */
.policy-body {
    font-family: 'Roboto', sans-serif;
    background: #121212;
    color: #e0e0e0;
    line-height: 1.7;
    padding: 40px 20px;
    display: block;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #1a1a1a;
    padding: 50px 60px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    border: 1px solid #2a2a2a;
}

.container h1 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00d5e7;
    letter-spacing: -0.5px;
}

.container h2 {
    font-size: 22px;
    font-weight: 600;
    color: #00d5e7;
    margin: 30px 0 16px;
    padding-top: 10px;
}

.container h3 {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    margin: 22px 0 12px;
}

.container p {
    font-size: 15px;
    color: #c0c0c0;
    margin-bottom: 14px;
}

.container ul,
.container ol {
    margin: 10px 0 16px 25px;
    color: #c0c0c0;
}

.container li {
    font-size: 15px;
    margin-bottom: 6px;
}

.container a {
    color: #00d5e7;
    text-decoration: none;
    transition: 0.2s;
}

.container a:hover {
    text-decoration: underline;
    color: #00e5f7;
}

.container .highlight {
    color: #00d5e7;
    font-weight: 500;
}

.container .section {
    margin-bottom: 10px;
}

.table-wrap {
    overflow-x: auto;
    margin: 16px 0 20px;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table-wrap table th {
    background: #252525;
    color: #00d5e7;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid #00d5e7;
}

.table-wrap table td {
    padding: 12px 16px;
    border-bottom: 1px solid #2a2a2a;
    color: #c0c0c0;
}

.table-wrap table tr:last-child td {
    border-bottom: none;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 28px;
    background: transparent;
    border: 2px solid #00d5e7;
    color: #00d5e7;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    transition: 0.25s;
    cursor: pointer;
    text-decoration: none;
}

.back-link:hover {
    background: #00d5e7;
    color: #121212;
    text-decoration: none;
}

.date {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.custom-notification {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    max-width: 90%;
    text-align: center;
    animation: slideDown 0.4s ease forwards;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-notification.success {
    background: #1a3a2a;
    color: #00e676;
    border-color: #00e676;
}

.custom-notification.error {
    background: #3a1a1a;
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.custom-notification.fade-out {
    animation: fadeUp 0.4s ease forwards;
}

/* ===== УПРАВЛЕНИЕ ТОВАРОМ ===== */
.product-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.product-controls .size-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #333;
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    cursor: pointer;
    outline: none;
    transition: 0.25s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300d5e7' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.product-controls .size-select:focus {
    border-color: #00d5e7;
    box-shadow: 0 0 0 3px rgba(0, 213, 231, 0.12);
}

.product-controls .size-select option {
    background: #252525;
    color: #e0e0e0;
}

.qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.qty-btn:hover {
    background: #00d5e7;
    color: #121212;
    border-color: #00d5e7;
}

.qty-btn.minus {
    border-radius: 8px 0 0 8px;
}

.qty-btn.plus {
    border-radius: 0 8px 8px 0;
}

.qty-input {
    width: 44px;
    height: 32px;
    border: 1px solid #333;
    border-left: none;
    border-right: none;
    background: #1a1a1a;
    color: #e0e0e0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    outline: none;
    padding: 0;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    border-color: #00d5e7;
}

.add-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: 0.25s;
    border: 2px solid #00d5e7;
    background: transparent;
    color: #00d5e7;
    width: 100%;
}

.add-btn:hover {
    background: #00d5e7;
    color: #121212;
}

/* ===== КОРЗИНА ===== */
.cart-section {
    background: #1a1a1a;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #2a2a2a;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cart-header h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.cart-total {
    color: #00d5e7;
    font-size: 20px;
    font-weight: 700;
}

.cart-items {
    min-height: 40px;
    max-height: 300px;
    overflow-y: auto;
}

.cart-items::-webkit-scrollbar {
    width: 4px;
}

.cart-items::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #00d5e7;
    border-radius: 4px;
}

.cart-empty {
    color: #666;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #252525;
    border-radius: 12px;
    margin-bottom: 6px;
    border-left: 3px solid #00d5e7;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
}

.cart-item-name {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}

.cart-item-details {
    color: #888;
    font-size: 12px;
}

.cart-item-details span {
    margin-right: 10px;
}

.cart-item-price {
    color: #00d5e7;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}

.cart-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
    transition: 0.2s;
    line-height: 1;
}

.cart-item-remove:hover {
    transform: scale(1.3);
}

.selected-count {
    color: #00d5e7;
    font-weight: 700;
    font-size: 14px;
}

/* ===== ИНФОРМАЦИЯ О САМОВЫВОЗЕ ===== */
.pickup-info {
    margin-top: 14px;
    padding: 16px 18px;
    background: #1a2a2a;
    border-radius: 14px;
    border: 1px solid #2a4a4a;
}

.pickup-address {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    font-size: 15px;
    margin-bottom: 10px;
}

.pickup-address strong {
    color: #00d5e7;
    font-weight: 600;
}

.pickup-address span {
    color: #c0c0c0;
}

.pickup-map-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #00d5e7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 16px;
    border: 1px solid #00d5e7;
    border-radius: 20px;
    transition: 0.25s;
    margin-bottom: 10px;
}

.pickup-map-link:hover {
    background: #00d5e7;
    color: #121212;
    text-decoration: none;
}

.pickup-worktime {
    color: #888;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pickup-info.hidden {
    display: none;
}

/* ===== КАПЧА ===== */
.captcha-container {
    margin: 10px 0 6px;
    min-height: 80px;
}

.captcha-container .required-msg {
    margin-top: 8px;
}

.smart-captcha {
    display: inline-block;
}

/* Адаптив */
@media (max-width: 540px) {
    .qty-control {
        width: 100%;
    }

    .qty-input {
        flex: 1;
    }

    .cart-item {
        flex-wrap: wrap;
        gap: 6px;
    }

    .cart-item-right {
        width: 100%;
        justify-content: space-between;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
}

@media (max-width: 480px) {
    .custom-notification {
        top: 20px;
        padding: 14px 20px;
        font-size: 14px;
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 30px 25px;
    }
    .container h1 {
        font-size: 26px;
    }
    .container h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 16px;
    }
    .container h1 {
        font-size: 22px;
    }
    .table-wrap table th,
    .table-wrap table td {
        padding: 8px 10px;
        font-size: 13px;
    }
}