/* ============================================
   PRODUCT PAGE - REDESIGNED MODERN & CLEAN
   Wider images, better spacing, contemporary feel
   ============================================ */

   :root {
    --st-red: #eb1f3a;
    --st-black: #000000;
    --st-gray-50: #fafafa;
    --st-gray-100: #f5f5f5;
    --st-gray-200: #e5e5e5;
    --st-gray-300: #d4d4d4;
    --st-gray-600: #525252;
    --st-gray-900: #1a1a1a;
    --border-radius-sm: 12px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ========== HIDE WOOCOMMERCE DEFAULTS ========== */
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image,
.flex-viewport,
.flex-control-thumbs,
div.product div.images,
.summary.entry-summary:not(.st-product-info) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ========== BASE - WIDER LAYOUT ========== */
.st-product-page {
    background: #fff;
    padding: 60px 0 80px;
    min-height: 100vh;
}

.st-product-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid !important;
    grid-template-columns: 1.4fr 1fr !important;
    gap: 100px !important;
    align-items: start !important;
}

/* ========== LEFT: GALLERY (WIDER) ========== */
.st-product-gallery {
    display: block !important;
    position: sticky;
    top: 120px;
}

.st-main-image {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--st-gray-50);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--st-gray-200);
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
}

.st-main-image:hover {
    box-shadow: var(--shadow-md);
}

.st-main-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block !important;
    transition: transform 0.4s ease;
}

.st-main-image:hover img {
    transform: scale(1.02);
}

.st-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--st-gray-300);
}

.st-no-image svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
}

.st-no-image p {
    font-size: 0.9rem;
    color: var(--st-gray-400);
}

.st-sale-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #eb1f3a 0%, #c71631 100%);
    color: #fff;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(235, 31, 58, 0.3);
}

/* ========== THUMBNAILS - MODERN STYLE ========== */
.st-thumbnails {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-auto-rows: 1fr !important;
    max-height: calc(2 * 80px + 8px) !important; /* 2 rows + gap */
    overflow: hidden !important;
    gap: 8px !important;
    padding: 8px 0 !important;
    margin-top: 0 !important;
    background: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.st-thumb {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 80px !important;
    border-radius: var(--border-radius-md) !important;
    overflow: hidden !important;
    border: 2px solid var(--st-gray-200) !important;
    cursor: pointer !important;
    background: var(--st-gray-50) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.st-thumb img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

.st-thumb:hover {
    border-color: var(--st-black) !important;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.st-thumb:hover img {
    transform: scale(1.1);
}

.st-thumb.active {
    border-color: var(--st-black) !important;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ========== RIGHT: PRODUCT INFO - REFINED ========== */
.st-product-info {
    padding: 0;
    max-width: 580px;
}

.st-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--st-gray-600);
    margin-bottom: 16px;
}

.st-breadcrumb a {
    color: var(--st-gray-600);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.st-breadcrumb a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--st-red);
    transition: width 0.3s ease;
}

.st-breadcrumb a:hover {
    color: var(--st-red);
}

.st-breadcrumb a:hover::after {
    width: 100%;
}

.st-breadcrumb span {
    opacity: 0.5;
}

/* ========== TITLE & META - CLEANER ========== */
.st-product-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--st-black);
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.st-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--st-gray-200);
}

.st-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.st-stars {
    display: flex;
    gap: 2px;
}

.st-stars .star {
    color: var(--st-gray-300);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.st-stars .star.filled {
    color: #fbbf24;
}

.st-rating-number {
    font-weight: 700;
    color: var(--st-black);
    font-size: 0.85rem;
}

.st-review-count {
    color: var(--st-gray-600);
    font-size: 0.75rem;
}

.st-sales {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

.st-sales::before {
    content: '🔥';
    font-size: 0.75rem;
}

/* ========== PRICE BOX - BOLD & MODERN ========== */
.st-price-box {
    background: var(--st-gray-50);
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--st-gray-200);
}

.st-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.st-price-main {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem !important;
    font-weight: 800;
    color: var(--st-red);
    line-height: 1;
    letter-spacing: -0.5px;
}

.st-price-old {
    font-size: 1.1rem;
    color: var(--st-gray-400);
    text-decoration: line-through;
    font-weight: 500;
}

.st-shipping-note {
    font-size: 0.75rem;
    color: var(--st-gray-600);
    font-weight: 500;
}

.st-lead-time {
    background: transparent;
    padding: 0;
    font-size: 0.8rem;
    color: var(--st-gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.st-lead-time svg {
    width: 14px;
    height: 14px;
    color: var(--st-gray-600);
}

.st-short-desc {
    margin-bottom: 24px;
    color: var(--st-gray-600);
    line-height: 1.6;
    font-size: 0.85rem;
}

/* ========== DESIGN SECTION - ELEVATED CARD ========== */
.st-design-section {
    background: #fff;
    border: 1px solid var(--st-gray-200);
    border-radius: var(--border-radius-md);
    padding: 18px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.st-design-section:hover {
    box-shadow: var(--shadow-md);
}

.st-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--st-black);
    margin-bottom: 14px;
}

.st-section-title svg {
    width: 16px;
    height: 16px;
    color: var(--st-gray-600);
}

.st-design-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.st-design-option {
    background: var(--st-gray-50);
    border: 2px solid var(--st-gray-200);
    border-radius: var(--border-radius-md);
    padding: 16px 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.st-design-option:hover {
    border-color: var(--st-black);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.st-design-option.selected {
    border-color: var(--st-black);
    background: var(--st-black);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.st-design-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.st-option-content {
    text-align: center;
}

.st-option-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.st-option-content h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--st-black);
}

.st-design-option.selected h4 {
    color: #fff;
}

.st-option-content p {
    font-size: 0.7rem;
    color: var(--st-gray-600);
    font-weight: 500;
}

.st-design-option.selected p {
    color: rgba(255, 255, 255, 0.9);
}

.st-file-upload-area {
    margin-top: 14px;
    padding: 28px 20px;
    background: var(--st-gray-50);
    border: 2px dashed var(--st-gray-300);
    border-radius: var(--border-radius-md);
    text-align: center;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
}

.st-file-upload-area:hover {
    border-color: var(--st-black);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.st-file-upload-area.active {
    display: block;
}

.st-upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.st-upload-text {
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: var(--st-black);
    font-weight: 600;
}

.st-upload-hint {
    font-size: 0.7rem;
    color: var(--st-gray-600);
    font-weight: 500;
}

/* ========== VARIATIONS - REFINED PILLS ========== */
.st-variation-group {
    margin-bottom: 20px;
}

.st-variation-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--st-black);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.st-variation-label svg {
    width: 14px;
    height: 14px;
}

.st-variation-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.st-var-btn {
    padding: 10px 20px;
    background: #fff;
    border: 2px solid var(--st-gray-200);
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--st-black);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.st-var-btn:hover {
    border-color: var(--st-black);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.st-var-btn.selected {
    background: var(--st-red);
    border-color: var(--st-red);
    color: #fff;
    box-shadow: 0 6px 20px rgba(235, 31, 58, 0.4);
    transform: translateY(-2px);
}

.st-hidden-select {
    display: none !important;
}

/* ========== QUANTITY SECTION - MODERN ========== */
.st-quantity-section {
    margin-bottom: 24px;
}

.st-quantity-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.st-qty-option {
    padding: 10px 20px;
    background: #fff;
    border: 2px solid var(--st-gray-200);
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--st-black);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 90px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.st-qty-option:hover {
    border-color: var(--st-black);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.st-qty-option.selected {
    background: var(--st-black);
    border-color: var(--st-black);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

#st-quantity-value {
    display: none;
}

/* ========== ADD TO CART - PREMIUM BUTTON ========== */
.st-add-to-cart-btn {
    width: 100%;
    padding: 14px 32px;
    background: linear-gradient(135deg, #eb1f3a 0%, #c71631 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(235, 31, 58, 0.3);
    position: relative;
    overflow: hidden;
}

.st-add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.st-add-to-cart-btn:hover::before {
    left: 100%;
}

.st-add-to-cart-btn:hover {
    background: linear-gradient(135deg, #d41635 0%, #a71229 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(235, 31, 58, 0.45);
}

.st-add-to-cart-btn:active {
    transform: translateY(-1px);
}

.st-add-to-cart-btn:disabled {
    background: var(--st-gray-300);
    cursor: not-allowed;
    box-shadow: none;
}

/* ========== TRUST BADGES - MODERN GRID ========== */
.st-trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--st-gray-200);
}

.st-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 12px;
    background: var(--st-gray-50);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--st-gray-200);
    transition: all 0.3s ease;
}

.st-badge-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.st-badge-item svg {
    width: 22px;
    height: 22px;
    color: #22c55e;
    margin-bottom: 8px;
}

.st-badge-item span {
    font-size: 0.75rem;
    color: var(--st-black);
    font-weight: 600;
}

/* ========== TABS - ELEVATED DESIGN ========== */
.st-product-tabs {
    max-width: 1440px;
    margin: 80px auto 0;
    padding: 0 40px;
}

.st-tabs-header {
    display: flex;
    gap: 48px;
    border-bottom: 2px solid var(--st-gray-200);
    margin-bottom: 40px;
}

.st-tab-btn {
    padding: 20px 0;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--st-gray-600);
    cursor: pointer;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    position: relative;
}

.st-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--st-red);
    transition: width 0.3s ease;
}

.st-tab-btn:hover {
    color: var(--st-black);
}

.st-tab-btn.active {
    color: var(--st-red);
    border-bottom-color: transparent;
}

.st-tab-btn.active::after {
    width: 100%;
}

.st-tabs-content {
    padding: 20px 0;
}

.st-tab-panel {
    display: none;
}

.st-tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.st-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.st-specs-table tr {
    border-bottom: 1px solid var(--st-gray-200);
    transition: background 0.2s;
}

.st-specs-table tr:hover {
    background: var(--st-gray-50);
}

.st-specs-table td {
    padding: 20px 24px;
    font-size: 0.95rem;
}

.st-spec-label {
    font-weight: 700;
    color: var(--st-black);
    width: 35%;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1280px) {
    .st-product-container {
        max-width: 1200px;
        grid-template-columns: 1.2fr 1fr !important;
        gap: 60px !important;
    }
}

@media (max-width: 1024px) {
    .st-product-container {
        grid-template-columns: 1fr 1fr !important;
        gap: 50px !important;
    }
    
    .st-product-title {
        font-size: 1.5rem;
    }
    
    .st-price-main {
        font-size: 1.8rem !important;
    }
}

@media (max-width: 768px) {
    .st-product-page {
        padding: 40px 0 60px;
    }
    
    .st-product-container {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        padding: 0 24px;
    }
    
    .st-main-image {
        aspect-ratio: 16 / 10;
    }
    
    .st-product-gallery {
        position: relative;
        top: 0;
    }
    
    .st-product-info {
        max-width: 100%;
    }
    
    .st-product-title {
        font-size: 1.4rem;
    }
    
    .st-price-main {
        font-size: 1.6rem !important;
    }
    
    .st-design-options {
        grid-template-columns: 1fr;
    }
    
    .st-tabs-header {
        gap: 24px;
        overflow-x: auto;
    }
    
    .st-trust-badges {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .st-product-container {
        padding: 0 20px;
    }
    
    .st-product-title {
        font-size: 1.25rem;
    }
    
    .st-price-main {
        font-size: 1.5rem !important;
    }
    
    .st-price-box {
        padding: 14px 16px;
    }
    
    .st-quantity-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .st-variation-buttons {
        justify-content: space-between;
    }
    
    .st-var-btn,
    .st-qty-option {
        flex: 1;
        min-width: auto;
        padding: 10px 16px;
        font-size: 0.75rem;
    }
    
    .st-add-to-cart-btn {
        padding: 12px 28px;
        font-size: 0.85rem;
    }
    
    .st-thumbnails {
        grid-template-columns: repeat(2, 1fr) !important;
        max-height: calc(2 * 70px + 8px) !important;
    }

    .st-thumb {
        width: 100% !important;
        height: 70px !important;
    }
}

/* ========== SMOOTH ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.st-product-info > * {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: calc(var(--index, 0) * 0.08s);
}

.st-product-gallery {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ========== MICRO-INTERACTIONS ========== */
* {
    -webkit-tap-highlight-color: transparent;
}

button {
    -webkit-user-select: none;
    user-select: none;
}

.st-var-btn:active,
.st-qty-option:active {
    transform: scale(0.97);
}

/* ── Order Notes (shared across all calculators) ─────────────── */
.st-notes-wrap {
    margin: 16px 0 20px;
}

.st-notes-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #374151;
    margin-bottom: 8px;
}

.st-notes-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    color: #9ca3af;
}

.st-notes-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 13px;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    color: #111827;
    background: #fff;
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
    transition: border-color .17s, box-shadow .17s;
    box-sizing: border-box;
}

.st-notes-input:focus {
    outline: none;
    border-color: var(--color-red, #eb1f3a);
    box-shadow: 0 0 0 3px rgba(235,31,58,.10);
}

.st-notes-input::placeholder {
    color: #9ca3af;
}