/* ==============================================
   COSIONT HEART SRL — Single Product Styles
   Gallery, calculator, quote form, tabs, related
   ============================================== */

/* --- Product gallery --- */
.cst-product-gallery img {
    border-radius: 1rem;
    transition: transform 0.5s ease;
}
.cst-product-gallery img:hover {
    transform: scale(1.02);
}

/* Gallery thumbnail active (R20: CSS class toggled by JS) */
.cst-product-gallery .cst-thumb-active {
    border-color: rgba(197, 160, 89, 0.5) !important;
}

/* --- Product info --- */
.cst-product-info .price {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--cst-gold);
    font-weight: 700;
}

/* --- Add to cart button (fixed tier) --- */
.cst-product-info .single_add_to_cart_button {
    background: var(--cst-dark) !important;
    color: white !important;
    padding: 1rem 2.5rem !important;
    border-radius: 99px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.cst-product-info .single_add_to_cart_button:hover {
    background: var(--cst-gold) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

/* --- Quantity input --- */
.cst-product-info .quantity input {
    background: #f5f5f4 !important;
    border: 1px solid var(--cst-border) !important;
    border-radius: 99px !important;
    padding: 0.5rem !important;
    width: 60px !important;
    text-align: center;
    font-weight: 600;
}

/* ==============================================
   CALCULATOR & QUOTE FORM — Glassmorphism Box
   ============================================== */
.cst-estimator,
.cst-quote-form {
    margin-bottom: 1.5rem;
}

.cst-calc-box {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cst-border);
    border-radius: 1rem;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}
.cst-calc-box::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: rgba(197, 160, 89, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.cst-calc-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--cst-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cst-border);
    position: relative;
}
.cst-calc-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 3rem;
    height: 2px;
    background: var(--cst-gold);
}

/* --- Form Fields --- */
.cst-calc-field {
    margin-bottom: 1.25rem;
}
.cst-calc-field:last-of-type {
    margin-bottom: 0;
}
.cst-calc-field label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cst-text-dim);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.cst-calc-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--cst-border);
    border-radius: 10px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--cst-text-primary);
    transition: all 0.3s ease;
    outline: none;
    height: auto;
    line-height: 1.4;
}
.cst-calc-input:focus {
    border-color: var(--cst-gold);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.08);
}

select.cst-calc-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2378716c'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    padding-right: 2.5rem;
    cursor: pointer;
}

textarea.cst-calc-input {
    resize: vertical;
    min-height: 80px;
}

input[type="number"].cst-calc-input {
    -moz-appearance: textfield;
}
input[type="number"].cst-calc-input::-webkit-outer-spin-button,
input[type="number"].cst-calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Result Box --- */
.cst-calc-result {
    background: #fff;
    border: 2px solid var(--cst-gold);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    text-align: center;
    animation: cstResultFadeIn 0.4s ease;
}
@keyframes cstResultFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cst-calc-result-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--cst-text-dim);
    font-weight: 700;
    margin-bottom: 0.375rem;
}
.cst-calc-result-price {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--cst-gold);
    font-weight: 700;
    line-height: 1.2;
}
.cst-calc-result-note {
    font-size: 0.7rem;
    color: var(--cst-text-muted);
    margin-top: 0.5rem;
}

/* --- Action Buttons --- */
.cst-calc-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cst-btn-calculate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 2rem;
    background: var(--cst-dark);
    color: #fff;
    border: none;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.cst-btn-calculate:hover {
    background: var(--cst-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.25);
}
.cst-btn-calculate:active {
    transform: translateY(0) scale(0.98);
}

.cst-btn-add-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--cst-gold), #d4b06a);
    color: #fff;
    border: none;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(197, 160, 89, 0.3);
    animation: cstResultFadeIn 0.4s ease;
}
.cst-btn-add-cart:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(197, 160, 89, 0.35);
}

/* ==============================================
   TABS
   ============================================== */
.woocommerce-tabs .tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--cst-border);
    list-style: none;
    padding: 0;
    margin: 0;
}
.woocommerce-tabs .tabs li a {
    display: block;
    padding: 1rem 2rem;
    color: var(--cst-text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}
.woocommerce-tabs .tabs li.active a {
    color: var(--cst-gold);
    border-bottom-color: var(--cst-gold);
}

.woocommerce-Reviews {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.woocommerce-tabs .panel {
    animation: cstFadeIn 0.3s ease;
}
@keyframes cstFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==============================================
   RELATED PRODUCTS
   ============================================== */
.related.products > h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--cst-dark);
    margin-bottom: 1.5rem;
}
.related.products .products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1024px) {
    .related.products .products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .related.products .products { grid-template-columns: 1fr; }
}
.related.products .product {
    background: #fff;
    border: 1px solid var(--cst-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}
.related.products .product:hover {
    border-color: rgba(197, 160, 89, 0.3);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.1);
    transform: translateY(-3px);
}
.related.products .product img {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.related.products .product .woocommerce-loop-product__title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    padding: 0.75rem 1rem 0;
    color: var(--cst-dark);
}
.related.products .product .price {
    padding: 0.5rem 1rem 1rem;
    font-weight: 600;
}
.related.products .product .button {
    display: block;
    width: calc(100% - 2rem);
    margin: 0 1rem 1rem;
    text-align: center;
    background: var(--cst-dark) !important;
    color: #fff !important;
    padding: 0.6rem !important;
    border-radius: 99px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    transition: background 0.3s;
    border: none;
}
.related.products .product .button:hover {
    background: var(--cst-gold) !important;
}
