/**
 * OcBox Content Builder - Frontend Block Styles
 * 
 * These styles are applied to content created with Content Builder
 * when displayed on the frontend (catalog).
 * 
 * @package    OcBox Content Builder
 * @author     OcBox Team
 * @copyright  Copyright (c) 2026, ocbox.com.ua
 * @version    1.0.0
 */

/* ===== Base ===== */
.ocbox-block {
    margin: 20px 0;
}

/* ===== Hero Section ===== */
.ocbox-hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 8px;
}

.ocbox-hero h2,
.ocbox-hero-title {
    margin: 0 0 15px;
    font-size: 32px;
    font-weight: 700;
}

.ocbox-hero p,
.ocbox-hero-subtitle {
    margin: 0 0 20px;
    font-size: 18px;
    opacity: 0.9;
}

.ocbox-hero .ocbox-button {
    background: #fff;
    color: #667eea;
}

.ocbox-hero .ocbox-button:hover {
    background: #f8f9fa;
    color: #764ba2;
}

/* ===== Button ===== */
.ocbox-button {
    display: inline-block;
    padding: 14px 32px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.ocbox-button:hover {
    background: #0056b3;
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

.ocbox-button-wrapper {
    text-align: center;
    margin: 20px 0;
}

.ocbox-button-primary {
    background: #28a745;
}

.ocbox-button-primary:hover {
    background: #218838;
}

/* ===== Features Grid ===== */
.ocbox-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
}

@media (max-width: 768px) {
    .ocbox-features {
        grid-template-columns: 1fr;
    }
}

.ocbox-feature {
    text-align: center;
    padding: 20px;
}

.ocbox-feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.ocbox-feature strong {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
}

.ocbox-feature p {
    color: #666;
    margin: 0;
}

/* ===== Columns ===== */
.ocbox-columns {
    display: grid;
    gap: 20px;
}

.ocbox-columns[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.ocbox-columns[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.ocbox-columns[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .ocbox-columns {
        grid-template-columns: 1fr !important;
    }
}

.ocbox-column {
    padding: 10px;
}

/* ===== Gallery ===== */
.ocbox-gallery {
    display: grid;
    gap: 10px;
}

.ocbox-gallery[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.ocbox-gallery[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .ocbox-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.ocbox-gallery-item {
    overflow: hidden;
    border-radius: 4px;
}

.ocbox-gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ocbox-gallery-item img:hover {
    transform: scale(1.05);
}

/* ===== Specs Table ===== */
.ocbox-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.ocbox-specs-table td {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
}

.ocbox-specs-table td:first-child {
    background: #f8f9fa;
    font-weight: 600;
    width: 40%;
}

/* ===== CTA Section ===== */
.ocbox-cta {
    background: #f8f9fa;
    padding: 40px 20px;
    text-align: center;
    border-radius: 8px;
    margin: 20px 0;
}

.ocbox-cta-title {
    margin: 0 0 10px;
    font-size: 24px;
}

.ocbox-cta-text {
    margin: 0 0 20px;
    color: #666;
}

/* ===== Testimonial ===== */
.ocbox-testimonial {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.ocbox-testimonial-text {
    font-size: 20px;
    font-style: italic;
    color: #495057;
    margin-bottom: 20px;
    line-height: 1.6;
}

.ocbox-testimonial-author {
    color: #6c757d;
    font-weight: 600;
}

/* ===== Tabs ===== */
.ocbox-tabs-nav {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ocbox-tabs-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.ocbox-tabs-btn:hover {
    color: #007bff;
}

.ocbox-tabs-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.ocbox-tab {
    padding: 10px 0;
}

/* ===== Accordion ===== */
.ocbox-accordion {
    margin: 20px 0;
}

.ocbox-accordion-item {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.ocbox-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.ocbox-accordion-header:hover {
    background: #e9ecef;
}

.ocbox-accordion-icon::after {
    content: '+';
    font-size: 18px;
    font-weight: 400;
}

.ocbox-accordion-item.open .ocbox-accordion-icon::after {
    content: '−';
}

.ocbox-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.ocbox-accordion-item.open .ocbox-accordion-content {
    max-height: 1000px;
    padding: 20px;
}

/* ===== Lightbox ===== */
.ocbox-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.ocbox-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.ocbox-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.ocbox-lightbox-prev,
.ocbox-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ocbox-lightbox-prev:hover,
.ocbox-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ocbox-lightbox-prev {
    left: 20px;
}

.ocbox-lightbox-next {
    right: 20px;
}

/* ===== Video Embed ===== */
.ocbox-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 20px 0;
}

.ocbox-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== Print Styles ===== */
@media print {
    .ocbox-hero {
        background: #f5f5f5 !important;
        color: #333 !important;
        -webkit-print-color-adjust: exact;
    }
    
    .ocbox-lightbox {
        display: none !important;
    }
    
    .ocbox-accordion-content {
        max-height: none !important;
        padding: 20px !important;
    }
}
