/* ----------------------------------------------------------------

	Custom CSS



	Add all your Custom Styled CSS here for New Styles or

	Overwriting Default Theme Styles for Better Handling Updates

-----------------------------------------------------------------*/

a:hover {
    color: var(--cnvs-link-color)!important;
}

#copyrights p, #orderNumber, .checkout-card h2, .checkout-card .text-success {
    color: var(--cnvs-link-color)!important;
}

.owl-next {
    top: 50%!important;
    right: -50px!important;
}

.owl-prev {
    top: 50%!important;
    left: -50px!important;
}

/* УПРАВЛЕНИЕ ВИДИМОСТЬЮ КНОПКИ КОРЗИНЫ */

/* По умолчанию кнопка в хедере скрыта */
.header-misc .cart-toggle {
    display: none !important;
}

/* На ДЕСКТОПЕ показываем кнопку в хедере когда есть товары */
@media (min-width: 992px) {
    body.has-cart-items .header-misc .cart-toggle {
        display: block !important;
    }
}

/* МОБИЛЬНАЯ STICKY КНОПКА */
.mobile-sticky-cart {
    display: none !important;
}

@media (max-width: 991px) {
    /* На мобильных: кнопка в хедере ВСЕГДА скрыта */
    .header-misc .cart-toggle {
        display: none !important;
    }
    
    /* Sticky кнопка */
    .mobile-sticky-cart {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #2D2D2D;
        padding: 12px 16px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        z-index: 999;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    body.has-cart-items .mobile-sticky-cart {
        display: block !important;
        animation: slideUpCart 0.4s ease forwards;
    }
    
    @keyframes slideUpCart {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-sticky-cart-btn {
        display: block;
        width: 100%;
        background: #F1C77A;
        color: #1a1a1a;
        text-align: center;
        padding: 16px;
        text-decoration: none;
        font-weight: 600;
        font-size: 16px;
        border-radius: 8px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    }
    
    .mobile-sticky-cart-btn:hover,
    .mobile-sticky-cart-btn:active {
        background: #F1C77A;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
        color: #1a1a1a!important;
        text-decoration: none;
    }
    
    .mobile-sticky-cart-btn.cart-updated {
        animation: btnPulse 0.5s ease;
    }
    
    @keyframes btnPulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.05); }
    }
    
    body.has-cart-items {
        padding-bottom: 80px;
    }
    
    body.cart-open .mobile-sticky-cart {
        transform: translateY(100%);
    }
}

@media (max-width: 480px) {
    .mobile-sticky-cart {
        padding: 10px 12px;
    }
    
    .mobile-sticky-cart-btn {
        padding: 14px;
        font-size: 15px;
    }
}

/* Контейнер для опций - располагаем в ряд */
.form-group:has(input[type="radio"][name*="option"]) {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group:has(input[type="radio"][name*="option"]) > div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Скрываем оригинальные radio buttons */
input[type="radio"][name*="option"] {
    display: none;
}

/* Стилизуем labels как золотистые кнопки */
input[type="radio"][name*="option"] + label,
label:has(input[type="radio"][name*="option"]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    min-width: 120px;
    
    /* Золотистая тема */
    border: 1px solid #F1C77A;
    border-radius: 0;
    background: transparent;
    color: #d4af37;
    
    font-family: var(--cnvs-body-font);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* Hover эффект */
input[type="radio"][name*="option"] + label:hover,
label:has(input[type="radio"][name*="option"]):hover {
    background: rgba(212, 175, 55, 0.1);
    color: #f0d875;
    border-color: #F1C77A;
}

/* Выбранное состояние - золотистый фон */
input[type="radio"][name*="option"]:checked + label,
label:has(input[type="radio"][name*="option"]:checked) {
    background: rgba(241, 199, 122, 0.5);
    color: #000;
    border-color: #F1C77A;
    font-weight: 600;
}

/* Убираем галочку */
input[type="radio"][name*="option"]:checked + label::after,
label:has(input[type="radio"][name*="option"]:checked)::after {
    display: none;
}

/* Заголовок опции */
.form-group label[for*="input-option"] {
    color: #F1C77A;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .form-group:has(input[type="radio"][name*="option"]) > div {
        justify-content: center;
    }
    
    input[type="radio"][name*="option"] + label,
    label:has(input[type="radio"][name*="option"]) {
        min-width: 100px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Горизонтальный скролл для таблицы */
@media (max-width: 768px) {
  
  .table-scroll-wrapper {
    display: block !important;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 1rem 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  .table-scroll-wrapper table {
    display: table !important;
    min-width: 1200px !important;
    width: 1200px !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }
  
  .table-scroll-wrapper colgroup {
    display: none !important;
  }
  
  .table-scroll-wrapper td {
    display: table-cell !important;
    font-size: 0.75rem !important;
    padding: 0.5rem !important;
    width: 400px !important;
    min-width: 400px !important;
  }
  
  .table-scroll-wrapper tr {
    display: table-row !important;
  }
  
  .table-scroll-wrapper tbody {
    display: table-row-group !important;
  }
  
  .table-scroll-wrapper::after {
    content: "← Perbraukite pirštu, kad pamatytumėte daugiau →";
    display: block !important;
    text-align: left !important;
    color: #F1C77A !important;
    margin: 0.75rem 0 !important;
    padding: 0.4rem !important;
    border-radius: 4px !important;
    font-size: 0.7rem !important;
    opacity: 0.8 !important;
  }
}

.form-check {padding-left: 0;}

.agreement .form-check .form-check-input {
    float: none !important;
    margin-left: 0 !important;
}
