/* ============================================
   PREMIUM PRODUCT PAGE - Based on Actual HTML
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
    --jc-primary: #22c55e;
    --jc-primary-hover: #16a34a;
    --jc-dark: #0a0a0a;
    --jc-dark-secondary: #18181b;
    --jc-gray: #27272a;
    --jc-gray-light: #71717a;
    --jc-border: #e4e4e7;
    --jc-bg: #f5f5f5;
    --jc-bg-light: #fafafa;
    --jc-white: #ffffff;
    --jc-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* AGGRESSIVE RESET - Kill all padding/margin from parent theme */
.jc-product-page,
.jc-product-page *,
.jc-product-page *::before,
.jc-product-page *::after,
.jc-product-page ~ *,
body.single-product .site,
body.single-product .site-content,
body.single-product .entry-content,
body.single-product #page,
body.single-product #primary,
body.woocommerce.single-product .site,
body.woocommerce.single-product .site-content,
body.woocommerce.single-product #page,
body.woocommerce.single-product #primary,
.woocommerce.single-product .site,
.woocommerce.single-product .site-content,
.woocommerce.single-product #page,
.woocommerce.single-product #primary {
    /* margin: 0 !important; */
    /* padding: 0 !important; */
}

/* Override GeneratePress parent theme */
.entry-content:not(:first-child), 
.entry-summary:not(:first-child), 
.page-content:not(:first-child) {
    margin-top: 0 !important;
}

/* Override premium-navbar padding for single product */
body.single-product .site-content,
body.woocommerce.single-product .site-content {
    padding-top: 0 !important;
}

/* Override GeneratePress containers background */
.separate-containers .inside-article, 
.separate-containers .comments-area, 
.separate-containers .page-header, 
.one-container .container, 
.separate-containers .paging-navigation, 
.inside-page-header {
    background-color: transparent !important;
    padding-top: 0 !important;
}

/* Remove padding for mobile */
@media (max-width: 768px) {
    .inside-article {
        padding: 0 !important;
    }
}

/* Fix GeneratePress specific elements */
body.single-product #masthead,
body.single-product .site-header,
body.woocommerce.single-product #masthead,
body.woocommerce.single-product .site-header {
    margin: 0 !important;
    padding: 0 !important;
}

/* Reset */
.jc-product-page {
    font-family: 'Montserrat', sans-serif;
    background: var(--jc-bg);
    /* padding-top: 0 !important; */
    /* margin-top: 70px !important; */
}

/* Container */
.jc-product-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Product Main Section */
.jc-product-main {
    /* padding: 40px 0 60px; */
    /* background: var(--jc-bg); */
}

/* Grid */
.jc-product-grid {
    display: flex; /* Changed from grid to flex to fix stacking */
    gap: 40px;
    align-items: start;
    width: 100%;
}

.jc-product-gallery {
    width: 35%; /* Fixed width for gallery */
    flex-shrink: 0;
}

.jc-product-info {
    width: 65%; /* Fixed width for info */
    flex-grow: 1;
    position: sticky;
    top: 100px;
}

@media (max-width: 1024px) {
    .jc-product-grid {
        display: flex;
        flex-direction: column;
    }
    .jc-product-gallery, .jc-product-info {
        width: 100%;
    }
}

/* Gallery */
.jc-product-gallery {
    position: relative;
}

.jc-gallery-main {
    position: relative;
    background: var(--jc-white);
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 0.75;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.jc-gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jc-gallery-item:first-child {
    position: relative;
}

.jc-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.jc-gallery-main:hover .jc-main-image {
    transform: scale(1.05);
}

.jc-zoom-hint {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

/* Thumbnails */
.jc-gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.jc-thumbnail {
    flex-shrink: 0;
    width: 65px;
    height: 65px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: var(--jc-transition);
}

.jc-thumbnail:hover,
.jc-thumbnail.active {
    border-color: var(--jc-primary);
    opacity: 1;
}

.jc-thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.jc-product-info {
    position: sticky;
    top: 100px;
    padding: 24px;
    background: var(--jc-white);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}

.jc-product-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.jc-category-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--jc-primary);
    background: rgba(34, 197, 94, 0.1);
    padding: 6px 12px;
    border-radius: 5px;
}

.jc-product-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--jc-dark);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

/* Price */
.jc-product-price {
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.jc-regular-price {
    font-size: 18px;
    color: var(--jc-gray-light);
    text-decoration: line-through;
    font-weight: 500;
}

.jc-sale-price {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stock */
.jc-stock-status {
    margin-bottom: 20px;
    padding: 10px 14px;
    background: rgba(34, 197, 94, 0.08);
    border-radius: 8px;
    display: inline-block;
}

.jc-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.jc-stock-badge.jc-in-stock {
    color: #16a34a;
}

.jc-stock-badge svg {
    width: 16px;
    height: 16px;
}

/* Short Description */
.jc-short-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--jc-gray-light);
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--jc-border);
}

/* Customization Section */
.jc-customization-section {
    margin-bottom: 28px;
    padding: 18px;
    background: var(--jc-bg-light);
    border-radius: 12px;
}

.jc-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--jc-dark);
    margin-bottom: 14px;
}

.jc-section-title svg {
    color: var(--jc-primary);
    width: 18px;
    height: 18px;
}

.jc-custom-field {
    margin-bottom: 14px;
}

.jc-custom-field:last-child {
    margin-bottom: 0;
}

.jc-custom-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--jc-dark);
    margin-bottom: 8px;
}

.jc-select,
.jc-custom-field input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--jc-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--jc-transition);
    background: var(--jc-white);
}

.jc-select:focus,
.jc-custom-field input[type="text"]:focus {
    outline: none;
    border-color: var(--jc-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.jc-custom-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.jc-custom-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--jc-gray-light);
    margin-top: 12px;
    padding: 10px;
    background: rgba(34, 197, 94, 0.08);
    border-radius: 8px;
}

/* Size Section */
.jc-size-section {
    margin-bottom: 28px;
    padding: 18px;
    background: var(--jc-bg-light);
    border-radius: 12px;
}

.jc-size-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.jc-size-guide {
    font-size: 13px;
    color: var(--jc-primary);
    text-decoration: none;
    font-weight: 600;
}

.jc-size-guide:hover {
    text-decoration: underline;
}

.jc-size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.jc-size-btn {
    min-width: 54px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--jc-border);
    border-radius: 8px;
    background: var(--jc-white);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    color: var(--jc-dark);
    cursor: pointer;
    transition: var(--jc-transition);
}

.jc-size-btn:hover {
    border-color: var(--jc-dark);
}

.jc-size-btn.active {
    background: var(--jc-dark);
    border-color: var(--jc-dark);
    color: white;
}

/* Cart Section */
.jc-cart-section {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.jc-quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--jc-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--jc-white);
}

.jc-qty-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--jc-transition);
    color: var(--jc-dark);
}

.jc-qty-btn:hover {
    background: var(--jc-bg-light);
    color: var(--jc-primary);
}

.jc-qty-input {
    width: 44px;
    height: 44px;
    border: none;
    border-left: 1px solid var(--jc-border);
    border-right: 1px solid var(--jc-border);
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    -moz-appearance: textfield;
    background: var(--jc-white);
}

.jc-qty-input::-webkit-outer-spin-button,
.jc-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.jc-add-to-cart-btn {
    flex: 1;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--jc-transition);
}

.jc-add-to-cart-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.jc-wishlist-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--jc-white);
    border: 2px solid var(--jc-border);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--jc-transition);
    color: var(--jc-dark);
}

.jc-wishlist-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Product Meta */
.jc-product-meta {
    padding-top: 18px;
    border-top: 1px solid var(--jc-border);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.jc-meta-item {
    font-size: 13px;
    color: var(--jc-gray-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.jc-meta-label {
    font-weight: 700;
    color: var(--jc-dark);
}

/* Tabs */
.jc-product-tabs {
    background: var(--jc-bg-light);
    padding: 60px 0;
}

.jc-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--jc-border);
    margin-bottom: 32px;
    overflow-x: auto;
}

.jc-tab-btn {
    padding: 16px 24px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--jc-gray-light);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.jc-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--jc-primary);
    transform: scaleX(0);
    transition: var(--jc-transition);
}

.jc-tab-btn:hover {
    color: var(--jc-dark);
}

.jc-tab-btn.active {
    color: var(--jc-dark);
}

.jc-tab-btn.active::after {
    transform: scaleX(1);
}

.jc-tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.jc-tab-panel.active {
    display: block;
}

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

.jc-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.jc-specs-table th,
.jc-specs-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--jc-border);
}

.jc-specs-table th {
    font-weight: 600;
    color: var(--jc-dark);
    width: 40%;
}

.jc-specs-table td {
    color: var(--jc-gray-light);
}

.jc-shipping-info h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--jc-dark);
}

.jc-shipping-info p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--jc-gray-light);
    margin-bottom: 12px;
}

/* Related Products */
.jc-related-products {
    padding: 60px 0;
    background: var(--jc-bg);
}

.jc-section-heading {
    font-size: 28px;
    font-weight: 800;
    color: var(--jc-dark);
    text-align: center;
    margin-bottom: 40px;
}

.jc-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .jc-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.jc-related-item {
    background: var(--jc-white);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--jc-transition);
}

.jc-related-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.1);
}

.jc-related-item a {
    text-decoration: none;
}

.jc-related-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.jc-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jc-related-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--jc-dark);
    padding: 16px 16px 8px;
    line-height: 1.4;
}

.jc-related-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--jc-primary);
    padding: 0 16px 16px;
}

/* Modal */
.jc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--jc-transition);
}

.jc-modal.active {
    opacity: 1;
    visibility: visible;
}

.jc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.jc-modal-content {
    position: relative;
    background: var(--jc-white);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: var(--jc-transition);
}

.jc-modal.active .jc-modal-content {
    transform: scale(1);
}

.jc-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f5;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.jc-modal-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--jc-dark);
}

.jc-size-guide-table {
    width: 100%;
    border-collapse: collapse;
}

.jc-size-guide-table th,
.jc-size-guide-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid var(--jc-border);
}

.jc-size-guide-table th {
    background: var(--jc-dark);
    color: white;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .jc-product-page .container {
        padding: 0 16px;
    }
    
    .jc-product-grid {
        display: flex;
        flex-direction: column;
    }
    
    .jc-product-gallery, 
    .jc-product-info {
        width: 100%;
    }
    
    .jc-product-title {
        font-size: 26px;
    }
    
    .jc-cart-section {
        flex-wrap: wrap;
    }
    
    .jc-add-to-cart-btn {
        order: -1;
        width: 100%;
    }
    
    .jc-tabs-nav {
        gap: 0;
    }
    
    .jc-tab-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ============================================
   PREMIUM BREADCRUMB
   ============================================ */
.jc-breadcrumb {
    background: transparent;
    padding: 20px 0 20px 24px;
    margin-bottom: 0;
    position: relative;
    z-index: 100;
}

.jc-breadcrumb-nav {
    display: block;
}

.jc-breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 12px 20px;
    gap: 8px;
    background: transparent;
    border-radius: 12px;
}

.jc-breadcrumb-item {
    display: flex;
    align-items: center;
}

.jc-breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.jc-breadcrumb-link:hover {
    color: var(--jc-primary);
}

.jc-breadcrumb-link svg {
    opacity: 0.5;
}

.jc-breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.jc-breadcrumb-separator {
    display: flex;
    align-items: center;
    color: #999999;
    margin: 0 2px;
}

.jc-breadcrumb-current {
    color: #333333;
    font-size: 14px;
    font-weight: 500;
}

.jc-breadcrumb-current span {
    color: var(--jc-gray-light);
    font-weight: 400;
}

@media (max-width: 640px) {
    .jc-breadcrumb-list {
        gap: 2px;
    }
    
    .jc-breadcrumb-link {
        font-size: 13px;
    }
    
    .jc-breadcrumb-link span {
        display: none;
    }
    
    /* Additional mobile fixes */
    .jc-product-title {
        font-size: 22px;
    }
    
    .jc-product-price {
        flex-direction: column;
        gap: 8px;
    }
    
    .jc-sale-price {
        font-size: 24px;
    }
    
    .jc-cart-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .jc-add-to-cart-btn {
        width: 100%;
    }
    
    .jc-wishlist-btn {
        width: 100%;
    }
    
    .jc-tabs-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }
    
    .jc-tab-btn {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .jc-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .jc-gallery-main {
        aspect-ratio: 1;
    }
    
    .jc-size-options {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .jc-size-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 60px;
    }
    
    .jc-quantity-selector {
        width: 100%;
        justify-content: center;
    }
}
