/* =========================================================
   TARA FASHION — PRODUCT PAGE
   Uses theme.css variables only
   ========================================================= */

/* PAGE WRAPPER */
.tf-product-page {
    max-width: var(--container-width);
    margin: 60px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
}

/* ================================
   GALLERY
================================ */
.tf-product-gallery {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tf-product-main-image {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.tf-product-main-image img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    display: block;
}

/* THUMBNAILS */
.tf-product-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tf-product-thumbs img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border var(--transition-fast), transform var(--transition-fast);
}

.tf-product-thumbs img:hover {
    transform: translateY(-2px);
}

.tf-product-thumbs img.active {
    border-color: var(--color-primary-strong);
}

/* ================================
   DETAILS
================================ */
.tf-product-details {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-glass);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* TITLE */
.tf-product-title {
    font-family: var(--font-heading);
    font-size: 32px;
    line-height: 1.2;
    margin: 0;
    color: var(--color-text-main);
}

/* PRICE */
.tf-product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.tf-product-price .price-offer {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary-strong);
}

.tf-product-price .price-original {
    font-size: 15px;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.tf-product-price .price-regular {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-main);
}

/* STOCK BADGE */
.tf-stock-badge {
    display: inline-block;
    width: fit-content;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-pill);
}

.tf-stock-badge.in-stock {
    background: #e8f7ef;
    color: #2e7d32;
}

.tf-stock-badge.out-stock {
    background: #fdecea;
    color: #c62828;
}

/* ACTION BUTTONS */
.tf-actions {
    display: flex;
    gap: 14px;
    margin-top: 8px;
}

.tf-actions form {
    flex: 1;
}

/*.tf-btn-primary,*/
/*.tf-btn-secondary {*/
/*    width: 50%;*/
/*    padding: 12px 0;*/
/*    border-radius: var(--radius-pill);*/
/*    border: none;*/
/*    font-size: 14px;*/
/*    font-weight: 600;*/
/*    cursor: pointer;*/
/*    transition: transform var(--transition-fast), box-shadow var(--transition-fast);*/
/*}*/

/* PRIMARY */
/* FORCE PRIMARY CTA TO STAND OUT */
.tf-btn-primary {
    background: linear-gradient(135deg, #ec407a, #d81b60);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(216, 27, 96, 0.55);
    font-size: 15px;
    letter-spacing: 0.3px;
}

.tf-btn-primary:hover {
    background: linear-gradient(135deg, #d81b60, #ad1457);
    box-shadow: 0 18px 36px rgba(216, 27, 96, 0.65);
}


/* SECONDARY */
.tf-btn-secondary {
    background: var(--glass-bg-strong);
    color: var(--color-primary-strong);
    border: 1px solid var(--glass-border);
}

.tf-btn-secondary:hover {
    transform: translateY(-2px);
}

/* SHORT DESCRIPTION */
.tf-product-shortdesc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-soft);
}

/* ================================
   LONG DESCRIPTION
================================ */
.tf-product-longdesc {
    max-width: var(--container-width);
    margin: 60px auto;
    padding: 32px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.tf-product-longdesc h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    margin-bottom: 14px;
}

.tf-product-longdesc p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-soft);
}

/* ================================
   RELATED PRODUCTS
================================ */
.tf-related-section {
    max-width: var(--container-width);
    margin: 80px auto;
    padding: 0 16px;
}

.tf-related-section h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    margin-bottom: 24px;
    text-align: center;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
    .tf-product-page {
        grid-template-columns: 1fr;
    }

    .tf-product-main-image img {
        height: 420px;
    }
}

@media (max-width: 600px) {
    .tf-product-main-image img {
        height: 320px;
    }

    .tf-product-title {
        font-size: 26px;
    }
}

/* IMAGE ARROWS */
.tf-product-main-image {
    position: relative;
}

.tf-image-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.tf-image-arrow:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.tf-image-arrow.left {
    left: 12px;
}

.tf-image-arrow.right {
    right: 12px;
}

/* ================================
   PRODUCT PAGE – WISHLIST CTA FIX
================================ */

/* Make wishlist button clearly visible */
.tf-btn-secondary {
    background: transparent;
    color: var(--color-primary-strong);
    border: 2px solid var(--color-primary-strong);
    font-size: 14px;
    font-weight: 600;
}

/* Hover state */
.tf-btn-secondary:hover {
    background: var(--color-primary-soft);
    box-shadow: 0 8px 20px rgba(236, 64, 122, 0.25);
    transform: translateY(-2px);
}

/* Active wishlist state (heart clicked) */
.tf-wishlist-icon.active,
.tf-btn-secondary.active {
    background: linear-gradient(135deg, #ec407a, #d81b60);
    color: #ffffff;
    border-color: transparent;
}

/* ================================
   ACTION BUTTONS – FIX (FINAL)
   Buttons MUST stay next to each other
================================ */

.tf-actions {
    display: flex;
    gap: 14px;
    margin-top: 12px;
}

/*.tf-actions .tf-btn-primary,*/
/*.tf-actions .tf-btn-secondary {*/
/*    flex: 1;*/
/*    width: auto;            /* FIX: remove broken % width */
/*    padding: 12px 0;*/
/*    border-radius: var(--radius-pill);*/
/*}*/

/* Ensure buttons do NOT stack */
.tf-actions button {
    white-space: nowrap;
}

/* ================================
   ACTION BUTTONS – FINAL FIX
   Buttons MUST stay next to each other
================================ */

.tf-actions {
    display: flex;
    gap: 14px;
    margin-top: 12px;
}

.tf-actions .tf-btn-primary,
.tf-actions .tf-btn-secondary {
    flex: 1;          /* equal width */
    width: auto;     /* override any % widths */
    padding: 12px 0;
    border-radius: var(--radius-pill);
}

/* Prevent text wrapping */
.tf-actions button {
    white-space: nowrap;
}

/* =========================================
   HARD OVERRIDE — FORCE BUTTONS INLINE
   DO NOT CHANGE ANYTHING ELSE
========================================= */

.tf-actions {
    display: flex !important;
    align-items: stretch;
    gap: 14px;
}

/* KILL ANY ABSOLUTE / FLOAT / FIXED BEHAVIOUR */
.tf-actions .tf-wishlist-icon {
    position: static !important;
    float: none !important;
    margin: 0 !important;
}

/* Ensure equal width */
.tf-actions .tf-btn-primary,
.tf-actions .tf-btn-secondary {
    flex: 1 1 0;
    width: auto !important;
}


/* =========================================
   PIXEL ALIGNMENT FIX — DO NOT TOUCH DESIGN
========================================= */

.tf-actions .tf-btn-primary,
.tf-actions .tf-btn-secondary {
    box-sizing: border-box;
    height: 48px;           /* force identical height */
    line-height: 48px;      /* vertical text centering */
    padding: 0;             /* neutralize border math */
}


/* =========================================
   VISUAL ALIGNMENT FIX — SHADOW NORMALISATION
========================================= */

.tf-actions .tf-btn-primary {
    box-shadow: 0 10px 24px rgba(216, 27, 96, 0.45);
}

.tf-actions .tf-btn-secondary {
    box-shadow: 0 10px 24px rgba(216, 27, 96, 0.15);
}
