/**
 * Product Page Customization Styles
 * Version: 1.0.0
 * Date: November 20, 2025
 *
 * This stylesheet provides multiple layout variations for product detail pages
 * controlled by the Product Page Settings in the admin panel.
 */

/* ========================================
   LAYOUT STYLES
   ======================================== */

/* Modern Layout - Clean, contemporary with gradients */
.layout-modern {
    --page-bg: #f9fafb;
    --card-bg: #ffffff;
    --accent: var(--product-accent, var(--theme-primary, #6366f1));
}

.layout-modern .product-gallery-main {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
}

.layout-modern .product-title {
    background: linear-gradient(135deg, var(--accent), var(--theme-secondary, #8b5cf6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fashion Layout - Visual-first, image-heavy */
.layout-fashion {
    --page-bg: #ffffff;
    --card-bg: #fafafa;
}

.layout-fashion .product-header-section {
    grid-template-columns: 1.5fr 1fr;
}

.layout-fashion .main-image-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.layout-fashion .product-title {
    font-weight: 300;
    letter-spacing: 0.02em;
    font-size: 36px;
}

/* Industrial Layout - Professional, structured */
.layout-industrial {
    --page-bg: #f3f4f6;
    --card-bg: #ffffff;
}

.layout-industrial .product-info-sidebar,
.layout-industrial .product-gallery-main {
    border: 2px solid #d1d5db;
}

.layout-industrial .product-title {
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.layout-industrial .meta-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

/* Luxury Layout - Elegant, spacious */
.layout-luxury {
    --page-bg: #fafafa;
    --card-bg: #ffffff;
}

.layout-luxury .product-header-section {
    gap: 80px;
}

.layout-luxury .product-info-sidebar {
    padding: 50px 40px;
}

.layout-luxury .product-title {
    font-family: 'Georgia', serif;
    font-weight: 300;
    font-size: 42px;
    line-height: 1.3;
}

/* Minimal Layout - Clean, simple */
.layout-minimal {
    --page-bg: #ffffff;
    --card-bg: #fafafa;
}

.layout-minimal .product-gallery-main,
.layout-minimal .product-info-sidebar {
    box-shadow: none;
    border: 1px solid #e5e7eb;
}

.layout-minimal .product-title {
    font-weight: 400;
    color: #1f2937;
}

/* Classic Layout - Traditional business */
.layout-classic {
    --page-bg: #f8f9fa;
    --card-bg: #ffffff;
}

.layout-classic .product-gallery-main,
.layout-classic .product-info-sidebar {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.layout-classic .product-title {
    font-family: 'Times New Roman', serif;
    font-weight: 600;
}

/* ========================================
   GALLERY LAYOUTS
   ======================================== */

/* Gallery Top */
.gallery-top .product-header-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
}

.gallery-top .product-gallery-main {
    order: 1;
}

.gallery-top .product-info-sidebar {
    order: 2;
}

/* Gallery Right */
.gallery-right .product-header-section {
    grid-template-columns: 1fr 1.2fr;
}

.gallery-right .product-gallery-main {
    order: 2;
}

.gallery-right .product-info-sidebar {
    order: 1;
}

/* ========================================
   THUMBNAIL LAYOUTS
   ======================================== */

/* Thumbnails Side */
.thumbnails-side .product-gallery-main {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
}

.thumbnails-side .thumbnail-gallery {
    order: 1;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fill, 100px);
}

.thumbnails-side .main-image-container {
    order: 2;
}

/* Thumbnails Grid */
.thumbnails-grid .thumbnail-gallery {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.thumbnails-grid .thumbnail-image {
    height: 80px;
}

/* Thumbnails None */
.thumbnails-none .thumbnail-gallery {
    display: none;
}

/* ========================================
   DETAILS DISPLAY TYPES
   ======================================== */

/* Accordion Style */
.details-accordion .tabs-header {
    display: none;
}

.details-accordion .tabs-content {
    padding: 0;
}

.details-accordion .tab-content {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.details-accordion .tab-content h2 {
    background: #f9fafb;
    padding: 20px 25px;
    margin: 0;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.details-accordion .tab-content h2:hover {
    background: #f3f4f6;
}

.details-accordion .tab-content h2::after {
    content: '▼';
    position: absolute;
    right: 25px;
    transition: transform 0.3s;
}

.details-accordion .tab-content.collapsed h2::after {
    transform: rotate(-90deg);
}

.details-accordion .tab-content > *:not(h2) {
    padding: 0 25px 25px;
}

/* Stacked Style */
.details-stacked .tabs-header {
    display: none;
}

.details-stacked .tab-content {
    display: block;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ========================================
   TAB STYLES
   ======================================== */

/* Pills Style */
.tab-style-pills .tab-button {
    background: #f3f4f6;
    border-radius: 25px;
    padding: 12px 28px;
    border-bottom: none;
    margin: 0 5px;
}

.tab-style-pills .tab-button:hover {
    background: #e5e7eb;
}

.tab-style-pills .tab-button.active {
    background: linear-gradient(135deg, var(--theme-primary, #6366f1), var(--theme-secondary, #8b5cf6));
    color: white;
}

.tab-style-pills .tab-button.active::before {
    display: none;
}

/* Boxed Style */
.tab-style-boxed .tabs-header {
    background: transparent;
    gap: 15px;
    border-bottom: none;
}

.tab-style-boxed .tab-button {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.tab-style-boxed .tab-button.active {
    background: var(--theme-primary, #6366f1);
    color: white;
    border-color: var(--theme-primary, #6366f1);
}

.tab-style-boxed .tab-button.active::before {
    display: none;
}

/* Minimal Style */
.tab-style-minimal .tab-button {
    padding: 12px 20px;
    font-weight: 400;
    color: #6b7280;
}

.tab-style-minimal .tab-button.active {
    color: #1f2937;
    background: transparent;
}

.tab-style-minimal .tab-button.active::before {
    height: 2px;
    background: #1f2937;
}

/* ========================================
   BUTTON STYLES
   ======================================== */

/* Outline Style */
.btn-style-outline .btn-primary {
    background: transparent;
    border: 2px solid var(--theme-primary, #6366f1);
    color: var(--theme-primary, #6366f1);
}

.btn-style-outline .btn-primary:hover {
    background: var(--theme-primary, #6366f1);
    color: white;
}

.btn-style-outline .btn-outline {
    background: transparent;
    border: 2px solid #6b7280;
    color: #6b7280;
}

.btn-style-outline .btn-outline:hover {
    background: #6b7280;
    color: white;
}

/* Ghost Style */
.btn-style-ghost .btn-primary,
.btn-style-ghost .btn-outline {
    background: transparent;
    border: none;
    color: var(--theme-primary, #6366f1);
    text-decoration: underline;
}

.btn-style-ghost .btn-primary:hover,
.btn-style-ghost .btn-outline:hover {
    color: var(--theme-secondary, #8b5cf6);
}

/* Gradient Style */
.btn-style-gradient .btn-primary {
    background: linear-gradient(135deg, var(--theme-primary, #6366f1), var(--theme-secondary, #8b5cf6));
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-style-gradient .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* ========================================
   SPECIFICATIONS LAYOUTS
   ======================================== */

/* Table Layout */
.specs-table .specifications-grouped {
    display: block;
}

.specs-table .spec-group-card {
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 30px;
}

.specs-table .spec-group-title {
    background: #f9fafb;
    color: #1f2937 !important;
    padding: 15px 20px;
    border-bottom: 2px solid #e5e7eb;
}

.specs-table .spec-table-wrapper {
    border: 1px solid #e5e7eb;
}

/* List Layout */
.specs-list .specifications-grouped {
    display: block;
}

.specs-list .spec-group-card {
    border: none;
    box-shadow: none;
    background: transparent;
}

.specs-list .spec-table {
    display: block;
}

.specs-list .spec-table tbody tr {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.specs-list .spec-table td {
    display: block;
    width: 100%;
    padding: 5px 0;
}

.specs-list .spec-name {
    font-weight: 700;
    color: #1f2937;
    background: transparent;
    border: none;
}

.specs-list .spec-value {
    color: #6b7280;
    padding-left: 20px;
}

/* Cards Layout */
.specs-cards .spec-table tbody tr {
    display: block;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 15px;
}

.specs-cards .spec-table td {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    padding: 5px 0;
}

/* Specification Styles */
.specs-style-bordered .spec-group-card {
    border: 2px solid #e5e7eb;
    box-shadow: none;
}

.specs-style-minimal .spec-group-card {
    border: none;
    box-shadow: none;
    background: transparent;
}

.specs-style-minimal .spec-group-title {
    background: transparent;
    color: #1f2937 !important;
    border-bottom: 2px solid #e5e7eb;
}

.specs-style-striped .spec-table tbody tr:nth-child(odd) {
    background: #f9fafb;
}

/* ========================================
   DESIGN ELEMENTS
   ======================================== */

/* Border Radius */
.radius-none * {
    border-radius: 0 !important;
}

.radius-small .product-gallery-main,
.radius-small .product-info-sidebar,
.radius-small .tabs-container,
.radius-small .btn {
    border-radius: 4px !important;
}

.radius-medium .product-gallery-main,
.radius-medium .product-info-sidebar,
.radius-medium .tabs-container {
    border-radius: 8px !important;
}

.radius-large .product-gallery-main,
.radius-large .product-info-sidebar,
.radius-large .tabs-container {
    border-radius: 12px !important;
}

.radius-xl .product-gallery-main,
.radius-xl .product-info-sidebar,
.radius-xl .tabs-container {
    border-radius: 20px !important;
}

/* Card Styles */
.card-flat .product-gallery-main,
.card-flat .product-info-sidebar,
.card-flat .tabs-container {
    box-shadow: none !important;
    background: var(--card-bg);
}

.card-elevated .product-gallery-main,
.card-elevated .product-info-sidebar,
.card-elevated .tabs-container {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

.card-bordered .product-gallery-main,
.card-bordered .product-info-sidebar,
.card-bordered .tabs-container {
    box-shadow: none !important;
    border: 2px solid #e5e7eb !important;
}

.card-glass .product-gallery-main,
.card-glass .product-info-sidebar,
.card-glass .tabs-container {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

/* Borders */
.no-borders * {
    border: none !important;
}

/* Shadows */
.no-shadows * {
    box-shadow: none !important;
}

/* Content Spacing */
.spacing-compact .product-info-sidebar,
.spacing-compact .tabs-content {
    padding: 20px !important;
}

.spacing-compact .product-header-section {
    gap: 30px !important;
}

.spacing-relaxed .product-info-sidebar,
.spacing-relaxed .tabs-content {
    padding: 50px !important;
}

.spacing-relaxed .product-header-section {
    gap: 70px !important;
}

/* Heading Sizes */
.heading-small .product-title {
    font-size: 24px !important;
}

.heading-medium .product-title {
    font-size: 30px !important;
}

.heading-large .product-title {
    font-size: 34px !important;
}

.heading-xl .product-title {
    font-size: 42px !important;
}

/* Sticky Info */
.sticky-info .product-info-sidebar {
    position: sticky;
    top: 20px;
}

/* ========================================
   RELATED PRODUCTS LAYOUTS
   ======================================== */

.layout-grid-2.related-products-grid {
    grid-template-columns: repeat(2, 1fr);
}

.layout-grid-3.related-products-grid {
    grid-template-columns: repeat(3, 1fr);
}

.layout-grid-4.related-products-grid {
    grid-template-columns: repeat(4, 1fr);
}

.layout-slider.related-products-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 20px;
}

.layout-slider .related-product-card {
    min-width: 280px;
    scroll-snap-align: start;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 1024px) {
    .gallery-top .product-header-section,
    .gallery-left .product-header-section,
    .gallery-right .product-header-section {
        grid-template-columns: 1fr;
    }

    .layout-grid-4.related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .thumbnails-side .product-gallery-main {
        grid-template-columns: 1fr;
    }

    .thumbnails-side .thumbnail-gallery {
        order: 2;
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        grid-template-rows: auto;
    }

    .thumbnails-grid .thumbnail-gallery {
        grid-template-columns: repeat(4, 1fr);
    }

    .layout-grid-2.related-products-grid,
    .layout-grid-3.related-products-grid,
    .layout-grid-4.related-products-grid {
        grid-template-columns: 1fr;
    }

    .spacing-relaxed .product-info-sidebar,
    .spacing-relaxed .tabs-content {
        padding: 25px !important;
    }

    .tab-style-boxed .tabs-header,
    .tab-style-pills .tabs-header {
        overflow-x: auto;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .gallery-nav-btn,
    .gallery-counter,
    .thumbnail-gallery,
    .product-actions,
    .related-products-section {
        display: none !important;
    }

    .product-header-section {
        grid-template-columns: 1fr;
    }

    .product-info-sidebar {
        position: static !important;
    }

    .tabs-header {
        display: none !important;
    }

    .tab-content {
        display: block !important;
        page-break-inside: avoid;
    }
}
