/**
 * Espectro Product Templates - Main Stylesheet
 */

/* ====================
   Archive/Category Page Styles
   ==================== */

.espectro-archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.espectro-breadcrumb {
    margin-bottom: 20px;
}

.espectro-breadcrumb nav {
    font-size: 14px;
    color: #666;
}

.espectro-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.espectro-breadcrumb a:hover {
    text-decoration: underline;
}

.espectro-archive-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.espectro-archive-layout {
    display: flex;
    gap: 40px;
}

/* Sidebar Styles */
.espectro-sidebar {
    flex: 0 0 250px;
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.espectro-categories-widget .widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.espectro-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.espectro-category-list > li {
    margin-bottom: 8px;
}

.espectro-category-list a {
    display: block;
    padding: 8px 12px;
    color: #374151;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.espectro-category-list a:hover {
    background: #e5e7eb;
    color: #1a1a1a;
}

.espectro-category-list .current-cat > a {
    background: #2563eb;
    color: white;
    font-weight: 600;
}

.espectro-subcategory-list {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
}

.espectro-subcategory-list li {
    margin-bottom: 5px;
}

.espectro-subcategory-list a {
    font-size: 14px;
    padding: 6px 10px;
}

/* Main Content Styles */
.espectro-main-content {
    flex: 1;
}

.espectro-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Product Card Styles */
.espectro-product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.espectro-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.espectro-product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #f3f4f6;
}

.espectro-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.espectro-product-card:hover .espectro-product-image img {
    transform: scale(1.05);
}

.espectro-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2563eb;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
}

.espectro-product-info {
    padding: 20px;
}

.espectro-product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.espectro-product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.espectro-product-title a:hover {
    color: #2563eb;
}

.espectro-product-buttons {
    display: flex;
    gap: 10px;
}

.espectro-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.espectro-btn-price {
    background: #16a34a;
    color: white;
}

.espectro-btn-price:hover {
    background: #15803d;
}

.espectro-btn-detail {
    background: #2563eb;
    color: white;
}

.espectro-btn-detail:hover {
    background: #1d4ed8;
}

/* Pagination */
.espectro-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.espectro-pagination .page-numbers {
    padding: 10px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}

.espectro-pagination .page-numbers:hover,
.espectro-pagination .page-numbers.current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* No Products */
.espectro-no-products {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

/* ====================
   Single Product Page Styles
   ==================== */

.espectro-single-product {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.espectro-single-product .espectro-breadcrumb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.espectro-back-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.espectro-back-link:hover {
    text-decoration: underline;
}

.back-arrow {
    font-size: 18px;
}

/* Product Main Section */
.espectro-product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* Product Gallery */
.espectro-product-gallery {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.espectro-main-image {
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 4/3;
}

.espectro-featured-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.espectro-thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.espectro-thumbnail {
    flex: 0 0 100px;
    height: 100px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.espectro-thumbnail:hover,
.espectro-thumbnail.active {
    border-color: #2563eb;
}

.espectro-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Summary */
.espectro-product-summary {
    padding: 20px 0;
}

.espectro-product-summary .espectro-product-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
    color: #1a1a1a;
}

.espectro-product-specs {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.espectro-spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.espectro-spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: #374151;
}

.spec-value {
    color: #1a1a1a;
    font-weight: 500;
}

.espectro-view-count {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f0f9ff;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #1e40af;
}

.view-icon {
    font-size: 18px;
}

.view-number {
    font-weight: 700;
}

.espectro-action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.espectro-btn-primary {
    flex: 1;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 16px;
}

.espectro-btn-primary:hover {
    background: #1d4ed8;
}

.espectro-btn-secondary {
    flex: 1;
    background: white;
    color: #2563eb;
    border: 2px solid #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 16px;
}

.espectro-btn-secondary:hover {
    background: #eff6ff;
}

.espectro-whatsapp-button {
    margin-bottom: 30px;
}

.espectro-btn-whatsapp {
    width: 100%;
    background: #25d366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 16px;
}

.espectro-btn-whatsapp:hover {
    background: #20ba5a;
}

.btn-icon {
    font-size: 18px;
}

/* Product Description Section */
.espectro-product-description-section {
    margin-top: 60px;
}

.espectro-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #2563eb;
}

.espectro-product-description {
    line-height: 1.8;
    color: #374151;
}

.espectro-product-description h2,
.espectro-product-description h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.espectro-product-description h2 {
    font-size: 28px;
}

.espectro-product-description h3 {
    font-size: 22px;
}

.espectro-product-description p {
    margin-bottom: 15px;
}

.espectro-product-description ul,
.espectro-product-description ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.espectro-product-description li {
    margin-bottom: 8px;
}

.espectro-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.espectro-project-item {
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.espectro-project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====================
   Responsive Styles
   ==================== */

@media (max-width: 1200px) {
    .espectro-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .espectro-archive-layout {
        flex-direction: column;
    }

    .espectro-sidebar {
        flex: 1;
        position: static;
    }

    .espectro-product-main {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .espectro-product-gallery {
        position: static;
    }

    .espectro-projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .espectro-action-buttons {
        flex-direction: column;
    }

    .espectro-tab-navigation {
        flex-wrap: wrap;
    }

    .espectro-tab-button {
        flex: 1;
        min-width: 150px;
    }

    .espectro-projects-grid {
        grid-template-columns: 1fr;
    }

    .espectro-product-summary .espectro-product-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .espectro-archive-title {
        font-size: 24px;
    }

    .espectro-product-buttons {
        flex-direction: column;
    }

    .espectro-thumbnail-gallery {
        flex-wrap: wrap;
    }
}

/* ====================
   Modal Styles
   ==================== */

.espectro-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

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

.espectro-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.espectro-modal-header {
    margin-bottom: 30px;
    text-align: center;
}

.espectro-modal-header h2 {
    color: #2563eb;
    font-size: 28px;
    margin: 0 0 10px 0;
}

.espectro-modal-header p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

.espectro-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #6b7280;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.espectro-modal-close:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.espectro-price-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.espectro-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.espectro-form-group {
    display: flex;
    flex-direction: column;
}

.espectro-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.espectro-form-group input,
.espectro-form-group textarea {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

.espectro-form-group input:focus,
.espectro-form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.espectro-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.espectro-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.espectro-form-checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.espectro-form-checkbox label {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    cursor: pointer;
}

.espectro-form-checkbox label a {
    color: #2563eb;
    text-decoration: none;
}

.espectro-form-checkbox label a:hover {
    text-decoration: underline;
}

.espectro-form-submit {
    background: #2563eb;
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.espectro-form-submit:hover {
    background: #1d4ed8;
}

.espectro-form-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.espectro-form-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

.espectro-form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.espectro-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

@media (max-width: 768px) {
    .espectro-modal-content {
        padding: 30px 20px;
    }

    .espectro-form-row {
        grid-template-columns: 1fr;
    }

    .espectro-modal-header h2 {
        font-size: 24px;
    }
}
