/* ============================================
   PRODUCT DETAIL - Premium Redesign Stylesheet
   ============================================ */

/* ── Typography & General Structure ── */
.product-info-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    margin-bottom: 0.75rem !important;
}

.product-category-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.product-category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    border: 1px solid rgba(29, 78, 216, 0.1);
}

.product-category-badge:hover {
    background-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-1px);
}

.product-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.product-vendor {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

.product-vendor .seller-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s, text-decoration 0.15s;
}

.product-vendor .seller-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.75rem 0 1.5rem;
    flex-wrap: wrap;
}

.product-meta-row .product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid #f1f5f9;
}

.product-meta-row .stars {
    display: flex;
    gap: 1px;
    color: #f59e0b;
}

.product-meta-row .rating-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.product-meta-row .product-sales {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
}


/* ── Premium Checkout Panel ── */
.product-checkout-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.03), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-checkout-panel:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

.product-price-section-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.product-price-section-new .price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-price-section-new .product-price {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.product-price-section-new .product-price-original {
    font-size: 1.125rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.product-price-section-new .discount-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}


/* ── Actions (Add to Cart, Save, Share) ── */
.product-actions-new {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.product-actions-new .btn {
    height: 3.25rem;
    border-radius: 0.875rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: none;
}

.product-actions-new .btn-add-cart-new {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.product-actions-new .btn-add-cart-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.product-actions-new .btn-add-cart-new:active {
    transform: translateY(0);
}

.product-actions-new .btn-save-new,
.product-actions-new .btn-share-new {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.product-actions-new .btn-save-new:hover,
.product-actions-new .btn-share-new:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-2px);
}

.product-actions-new .btn-save-new:active,
.product-actions-new .btn-share-new:active {
    transform: translateY(0);
}

/* Save Active State */
.product-actions-new .btn-save-new.favorited,
.product-actions-new .btn-save-new.btn-saved {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #ef4444 !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.1);
}

.product-actions-new .btn-save-new.favorited svg,
.product-actions-new .btn-save-new.btn-saved svg {
    fill: #ef4444;
}

/* Share Dropdown Wrapper & Panel */
.share-dropdown-wrapper {
    position: relative;
    display: contents;
}

.share-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 2000;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
    min-width: 240px;
    padding: 0.65rem;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.share-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.75rem;
    margin: 0;
}

.share-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.65rem;
    text-decoration: none;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.share-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.share-icon-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bg-whatsapp { background: #25D366; }
.bg-x { background: #0f172a; }
.bg-facebook { background: #1877F2; }
.bg-linkedin { background: #0A66C2; }
.bg-copy { background: #64748b; }

.share-menu-divider {
    margin: 0.4rem 0.75rem;
    border: none;
    border-top: 1px solid #f1f5f9;
}

.share-item-copy {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.65rem;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.share-item-copy:hover {
    background: #f1f5f9;
    color: #0f172a;
}


/* ── Trust Badges ── */
.product-trust-badges-new {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.trust-badge-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
    transition: background 0.2s, transform 0.2s;
}

.trust-badge-pill:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.trust-badge-pill svg {
    flex-shrink: 0;
}

.trust-badge-pill .icon-secure { color: #10b981; }
.trust-badge-pill .icon-download { color: #3b82f6; }
.trust-badge-pill .icon-lifetime { color: #8b5cf6; }


/* ── Product Metadata ── */
.product-metadata-new {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
    margin-top: 1.25rem;
}

.metadata-row-item {
    flex: 1 1 120px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.meta-label-new {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value-new {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}


/* ── Short Description ── */
.product-short-description-new {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #475569;
    background-color: #f8fafc;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.75rem;
}


/* ── Features Checklist ── */
.product-features-new {
    margin-bottom: 1.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
}

.features-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.features-list-new {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.features-item-new {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* Custom/raw HTML features padding and list bullet styles */
.features-custom-content ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin: 0.5rem 0 0 0 !important;
}

.features-custom-content li {
    margin-bottom: 0.5rem !important;
    line-height: 1.6 !important;
    color: #334155 !important;
    font-size: 0.9rem !important;
    padding-left: 0.25rem !important;
}

.features-item-new .icon-check {
    color: #10b981;
    background: #ecfdf5;
    border-radius: 50%;
    padding: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
}


/* ── Creator Profile / Seller Card ── */
.seller-card-new {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.25rem;
    margin-top: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.seller-card-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.05);
}

.seller-card-header-new {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.seller-avatar-new {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.seller-avatar-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.seller-info-new {
    flex: 1;
}

.seller-name-new {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.seller-link-new {
    color: inherit;
    text-decoration: none;
}

.seller-link-new:hover {
    color: #2563eb;
}

.seller-tagline-new {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0.1rem 0 0.35rem;
    font-style: italic;
    line-height: 1.3;
}

.seller-stats-new {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stat-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.stat-divider {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.rating-badge-new {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    color: #f59e0b;
}

.star-mini {
    flex-shrink: 0;
}

.btn-seller-profile {
    width: 100%;
    height: 2.75rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-seller-profile:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}


/* ── Tabs Component ── */
.tab-buttons {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.tab-buttons::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: #0f172a;
    background-color: #f8fafc;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background-color: transparent;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.25s ease-out;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tab contents styles & responsive image fixes */
.product-description,
.tab-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
}

.product-description img,
.tab-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin: 1.25rem 0;
    display: block;
}


/* ── Responsive Styling & Mobile UX Tweaks ── */
@media (max-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-gallery {
        position: static;
    }
}

@media (max-width: 768px) {
    /* Tighten typography & padding for mobile */
    .product-title {
        font-size: 1.75rem;
    }

    .product-checkout-panel {
        padding: 1.25rem;
        border-radius: 1rem;
        border-left: 3px solid #3b82f6;
    }

    /* Stack checkout actions on smaller screens */
    .product-actions-new {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .product-actions-new .btn {
        width: 100%;
        height: 3rem;
    }

    /* Wrap share button dropdown appropriately on mobile */
    .share-menu-dropdown {
        left: 0;
        right: 0;
        width: auto;
    }

    /* Adjust features box layout */
    .product-features-new {
        padding: 1rem;
    }

    /* Adjust seller card on mobile */
    .seller-card-new {
        padding: 1rem;
        border-radius: 1rem;
    }

    .seller-avatar-new {
        width: 3rem;
        height: 3rem;
        font-size: 1.1rem;
    }

    /* Enable swipe indication or layout spacing on mobile gallery */
    .product-gallery {
        margin-top: 1rem;
    }

    .product-gallery-main {
        margin-bottom: 0.75rem;
        border-radius: 1rem;
    }

    .product-gallery-thumbs {
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .product-thumb {
        width: 60px;
        height: 60px;
        border-radius: 0.5rem;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 1.5rem;
    }

    .product-price-section-new .product-price {
        font-size: 1.75rem;
    }

    .trust-badge-pill {
        width: 100%;
        justify-content: center;
        padding: 0.5rem;
    }
}
