/**
 * HC Price List - Professional Styling
 * Hair Company Professional UK
 */

/* Variables */
:root {
    --hc-black: #1a1a1a;
    --hc-dark-grey: #2b2b2b;
    --hc-gold: #c9a962;
    --hc-gold-light: #d4b97a;
    --hc-white: #ffffff;
    --hc-off-white: #f8f8f6;
    --hc-light-grey: #e8e8e8;
}

/* Main Container */
.hc-price-list-container {
    font-family: 'Montserrat', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: var(--hc-white);
    color: var(--hc-dark-grey);
    line-height: 1.4;
}

/* Page Header */
.hc-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--hc-light-grey);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.hc-header-logo {
    height: 45px;
    width: auto;
}

.hc-header-title {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--hc-gold);
    text-transform: uppercase;
    font-weight: 500;
}

/* Download PDF Button */
.hc-download-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--hc-gold);
    color: var(--hc-white);
    border: none;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hc-download-pdf-btn:hover {
    background: var(--hc-gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 169, 98, 0.3);
}

.hc-download-pdf-btn:active {
    transform: translateY(0);
}

.hc-download-pdf-btn svg {
    flex-shrink: 0;
}

/* Category Header */
.hc-category-section {
    margin-bottom: 50px;
}

.hc-category-header {
    background: linear-gradient(135deg, var(--hc-black) 0%, var(--hc-dark-grey) 100%);
    color: var(--hc-white);
    padding: 25px 30px;
    margin-bottom: 25px;
    position: relative;
}

.hc-category-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    width: 60px;
    height: 3px;
    background: var(--hc-gold);
}

.hc-category-header h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

.hc-category-header .hc-subcategory {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 3px;
    color: var(--hc-gold);
    margin-top: 8px;
}

/* Section Intro */
.hc-section-intro {
    padding: 20px 25px;
    background: var(--hc-off-white);
    margin-bottom: 25px;
    border-left: 4px solid var(--hc-gold);
}

.hc-section-intro p {
    font-size: 13px;
    line-height: 1.7;
    color: #666;
    margin: 0;
}

/* Subcategory Divider */
.hc-subcategory-divider {
    background: var(--hc-gold);
    color: var(--hc-white);
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 20px 0 15px 0;
}

/* Products Table */
.hc-products-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    table-layout: fixed;
}

.hc-products-table thead th {
    background: var(--hc-off-white);
    padding: 15px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--hc-dark-grey);
    border-bottom: 2px solid var(--hc-light-grey);
}

.hc-products-table thead th:last-child {
    text-align: right;
    width: 100px;
}

.hc-products-table tbody tr {
    border-bottom: 1px solid var(--hc-light-grey);
    transition: background 0.2s ease;
}

.hc-products-table tbody tr:hover {
    background: var(--hc-off-white);
}

.hc-products-table tbody td {
    padding: 16px 20px;
    vertical-align: middle;
}

/* Product Name */
.hc-product-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--hc-black) !important;
    margin-bottom: 4px;
    background: transparent !important;
}

/* Product Size */
.hc-product-size {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Product Price */
.hc-product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--hc-black) !important;
    text-align: right;
}

/* Normal rows - zebra striping (co drugi wiersz) */
.hc-price-list-container .hc-products-table tbody tr,
.hc-products-table tbody tr {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Every second row - light grey */
.hc-price-list-container .hc-products-table tbody tr:nth-child(even),
.hc-products-table tbody tr:nth-child(even) {
    background: #f9f9f9 !important;
    background-color: #f9f9f9 !important;
}

/* Hover effect - cream/gold tint */
.hc-price-list-container .hc-products-table tbody tr:hover,
.hc-products-table tbody tr:hover {
    background: rgba(201, 169, 98, 0.12) !important;
    background-color: rgba(201, 169, 98, 0.12) !important;
}

.hc-products-table tbody tr:hover .hc-product-name {
    color: #c9a962 !important;
}

/* Footer */
.hc-footer {
    background: linear-gradient(135deg, var(--hc-black) 0%, var(--hc-dark-grey) 100%);
    padding: 50px 40px;
    margin-top: 50px;
    text-align: center;
    color: var(--hc-white);
}

.hc-footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.hc-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.hc-contact-item {
    text-align: center;
}

.hc-contact-item h4 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--hc-gold);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hc-contact-item p {
    font-size: 14px !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

/* Footer links - override ALL Elementor styles */
.hc-footer .hc-contact-item a,
.hc-footer .hc-contact-item a:link,
.hc-footer .hc-contact-item a:visited,
.hc-footer .hc-contact-item p a,
.hc-footer .hc-contact-item p a:link,
.hc-footer .hc-contact-item p a:visited,
.hc-price-list-container .hc-footer .hc-contact-item a,
.hc-price-list-container .hc-contact-item a,
.elementor .hc-contact-item a,
.elementor-widget .hc-contact-item a,
body .hc-contact-item a {
    color: #ffffff !important;
    text-decoration: underline !important;
    background: transparent !important;
    box-shadow: none !important;
}

.hc-footer .hc-contact-item a:hover,
.hc-footer .hc-contact-item a:focus,
.hc-footer .hc-contact-item a:active,
.hc-footer .hc-contact-item p a:hover,
.hc-price-list-container .hc-footer .hc-contact-item a:hover,
.hc-price-list-container .hc-contact-item a:hover,
.elementor .hc-contact-item a:hover,
body .hc-contact-item a:hover {
    color: #c9a962 !important;
    text-decoration: underline !important;
}

.hc-tagline {
    font-size: 12px;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.5);
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hc-price-list-container {
        padding: 15px;
    }
    
    .hc-page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .hc-header-logo {
        height: 35px;
    }
    
    .hc-category-header {
        padding: 20px;
    }
    
    .hc-category-header h2 {
        font-size: 18px;
    }
    
    .hc-category-header::after {
        left: 20px;
    }
    
    .hc-products-table thead th,
    .hc-products-table tbody td {
        padding: 12px 15px;
    }
    
    .hc-product-name {
        font-size: 13px;
    }
    
    .hc-product-size {
        font-size: 11px;
    }
    
    .hc-product-price {
        font-size: 14px;
    }
    
    .hc-contact-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .hc-footer {
        padding: 40px 25px;
    }
}

@media (max-width: 480px) {
    .hc-products-table {
        display: block;
        overflow-x: auto;
    }
    
    .hc-subcategory-divider {
        font-size: 10px;
        padding: 10px 15px;
    }
    
    .hc-section-intro {
        padding: 15px 20px;
    }
    
    .hc-section-intro p {
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    .hc-price-list-container {
        max-width: none;
        padding: 0;
    }
    
    .hc-download-pdf-btn {
        display: none !important;
    }
    
    /* ALLOW category sections to break across pages - prevents empty space */
    .hc-category-section {
        page-break-inside: auto;
        break-inside: auto;
    }
    
    /* Keep category header + intro together with first content */
    .hc-category-header {
        page-break-after: avoid;
        break-after: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .hc-section-intro {
        page-break-after: avoid;
        break-after: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Keep subcategory divider with its table */
    .hc-subcategory-divider {
        page-break-after: avoid;
        break-after: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Allow tables to split across pages */
    .hc-products-table {
        page-break-inside: auto;
        break-inside: auto;
    }
    
    /* Repeat table header on new pages */
    .hc-products-table thead {
        display: table-header-group;
    }
    
    /* Keep individual rows intact */
    .hc-products-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
        page-break-after: auto;
    }
    
    .hc-products-table tbody tr:hover {
        background: transparent;
    }
    
    .hc-footer {
        page-break-before: always;
        break-before: page;
    }
}

/* PDF Mode Styles (for html2pdf generation) */
.hc-pdf-mode {
    width: 190mm !important;
    max-width: 190mm !important;
    padding: 0 !important;
    background: #fff !important;
}

.hc-pdf-mode .hc-page-header {
    padding: 15px 0;
    margin-bottom: 20px;
}

.hc-pdf-mode .hc-download-pdf-btn {
    display: none !important;
}

/* ALLOW category sections to break - prevents white space */
.hc-pdf-mode .hc-category-section {
    page-break-inside: auto;
    break-inside: auto;
    margin-bottom: 30px;
}

.hc-pdf-mode .hc-category-header {
    page-break-after: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
    padding: 15px 20px;
}

.hc-pdf-mode .hc-section-intro {
    page-break-after: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
}

.hc-pdf-mode .hc-subcategory-divider {
    page-break-after: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
    padding: 8px 15px;
    font-size: 10px;
}

.hc-pdf-mode .hc-products-table {
    page-break-inside: auto;
    break-inside: auto;
    font-size: 11px;
}

.hc-pdf-mode .hc-products-table thead {
    display: table-header-group;
}

.hc-pdf-mode .hc-products-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
}

.hc-pdf-mode .hc-products-table thead th,
.hc-pdf-mode .hc-products-table tbody td {
    padding: 8px 12px;
}

.hc-pdf-mode .hc-product-name {
    font-size: 11px;
}

.hc-pdf-mode .hc-product-size {
    font-size: 9px;
}

.hc-pdf-mode .hc-product-price {
    font-size: 12px;
}

.hc-pdf-mode .hc-section-intro {
    padding: 12px 15px;
    margin-bottom: 15px;
}

.hc-pdf-mode .hc-section-intro p {
    font-size: 10px;
}

.hc-pdf-mode .hc-footer {
    page-break-before: always;
    break-before: page;
    padding: 30px 25px;
    margin-top: 30px;
}

.hc-pdf-mode .hc-tagline {
    font-size: 10px;
}

/* Animation for hover effects */
.hc-products-table tbody tr {
    transition: all 0.2s ease;
}

.hc-products-table tbody tr:hover .hc-product-name {
    color: var(--hc-gold);
}

/* Category navigation (optional - for anchor links) */
.hc-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--hc-off-white);
    border-radius: 4px;
}

.hc-category-nav a {
    padding: 8px 16px;
    background: var(--hc-white);
    color: var(--hc-dark-grey);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid var(--hc-light-grey);
    transition: all 0.2s;
}

.hc-category-nav a:hover {
    background: var(--hc-gold);
    color: var(--hc-white);
    border-color: var(--hc-gold);
}

/* Badge for special products */
.hc-product-badge {
    display: inline-block;
    background: var(--hc-gold);
    color: var(--hc-white);
    font-size: 9px;
    padding: 3px 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: 8px;
    vertical-align: middle;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Highlight active category */
.hc-category-section:target .hc-category-header {
    box-shadow: 0 0 0 3px var(--hc-gold);
}

/* ========================================
   Product Images & Lightbox
   ======================================== */

/* Image column header */
.hc-th-image {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    background: var(--hc-off-white) !important;
}

/* Product image cell */
.hc-product-image-cell {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    padding: 10px 15px !important;
    text-align: center;
    background-color: inherit;
}

/* Product thumbnail wrapper */
.hc-lightbox {
    display: inline-block;
    cursor: zoom-in;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-radius: 15px;
    padding: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Product thumbnail */
.hc-product-thumb {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
    border: none;
    background: #ffffff !important;
    background-color: #ffffff !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.hc-product-thumb:hover {
    transform: scale(1.05);
}

.hc-lightbox:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Product link */
.hc-product-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.hc-product-link:hover .hc-product-name {
    color: var(--hc-gold) !important;
}

.hc-product-link .hc-product-name {
    transition: color 0.2s ease;
}

/* Lightbox Modal */
.hc-lightbox-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.hc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1000000;
}

.hc-lightbox-close:hover {
    color: var(--hc-gold);
}

.hc-lightbox-image {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    background: #ffffff !important;
}

.hc-lightbox-caption {
    color: #fff;
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* ========================================
   Responsive - Tablet (768px)
   ======================================== */
@media (max-width: 768px) {
    .hc-th-image,
    .hc-product-image-cell {
        width: 90px !important;
        min-width: 90px !important;
        max-width: 90px !important;
        padding: 8px !important;
    }
    
    .hc-lightbox {
        padding: 3px;
        border-radius: 10px;
    }
    
    .hc-product-thumb {
        width: 70px;
        height: 70px;
        border-radius: 8px;
    }
    
    .hc-lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }
    
    .hc-lightbox-image {
        max-width: 95%;
        max-height: 75vh;
    }
}

/* ========================================
   Responsive - Mobile (576px)
   ======================================== */
@media (max-width: 576px) {
    /* Hide image column on mobile */
    .hc-th-image,
    .hc-product-image-cell {
        display: none !important;
    }
    
    /* Adjust table for mobile without images - FULL WIDTH */
    .hc-products-table {
        table-layout: auto;
        width: 100% !important;
    }
    
    /* Product column takes all available space */
    .hc-products-table thead th:first-child,
    .hc-products-table tbody td:first-child {
        width: auto !important;
    }
    
    .hc-products-table thead th,
    .hc-products-table tbody td {
        padding: 10px 12px;
    }
    
    .hc-product-name {
        font-size: 12px;
    }
    
    .hc-product-size {
        font-size: 10px;
    }
    
    .hc-product-price {
        font-size: 13px;
        white-space: nowrap;
    }
    
    .hc-products-table thead th:last-child {
        width: 70px;
    }
}

/* ========================================
   Responsive - Very small mobile (400px)
   ======================================== */
@media (max-width: 400px) {
    .hc-products-table thead th,
    .hc-products-table tbody td {
        padding: 8px 10px;
    }
    
    .hc-product-name {
        font-size: 11px;
    }
    
    .hc-product-price {
        font-size: 12px;
    }
    
    .hc-subcategory-divider {
        font-size: 9px;
        padding: 8px 12px;
        letter-spacing: 1px;
    }
}

/* Hide images in PDF mode */
.hc-pdf-mode .hc-th-image,
.hc-pdf-mode .hc-product-image-cell {
    display: none !important;
}

@media print {
    .hc-th-image,
    .hc-product-image-cell {
        display: none !important;
    }
    
    .hc-lightbox-modal {
        display: none !important;
    }
}

/* ========================================
   Price List Selector Controls
   ======================================== */
.hc-price-list-selector-wrapper {
    font-family: 'Montserrat', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

.hc-selector-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    padding: 25px 30px;
    background: linear-gradient(135deg, var(--hc-black) 0%, var(--hc-dark-grey) 100%);
    border-radius: 8px;
    margin-bottom: 30px;
}

.hc-selector-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    flex: 1;
}

.hc-selector-group label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--hc-gold);
}

.hc-select {
    padding: 12px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--hc-dark-grey);
    background: var(--hc-white);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232b2b2b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.hc-select:hover {
    border-color: var(--hc-gold);
}

.hc-select:focus {
    outline: none;
    border-color: var(--hc-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.2);
}

.hc-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--hc-gold);
    color: var(--hc-white);
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hc-generate-btn:hover {
    background: var(--hc-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 98, 0.4);
}

.hc-generate-btn:active {
    transform: translateY(0);
}

.hc-generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.hc-generate-btn svg {
    flex-shrink: 0;
}

/* Price List Output Area */
.hc-price-list-output {
    min-height: 200px;
}

.hc-loading-placeholder {
    text-align: center;
    padding: 60px 30px;
    background: var(--hc-off-white);
    border: 2px dashed var(--hc-light-grey);
    border-radius: 8px;
    color: #888;
}

.hc-loading-placeholder p {
    font-size: 14px;
    margin: 0;
}

.hc-loading {
    text-align: center;
    padding: 80px 30px;
}

.hc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--hc-light-grey);
    border-top-color: var(--hc-gold);
    border-radius: 50%;
    animation: hc-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes hc-spin {
    to {
        transform: rotate(360deg);
    }
}

.hc-loading p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.hc-error {
    text-align: center;
    padding: 40px 30px;
    background: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    color: #cc0000;
}

.hc-error p {
    font-size: 14px;
    margin: 0;
}

/* Responsive for selector controls */
@media (max-width: 768px) {
    .hc-selector-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hc-selector-group {
        min-width: 100%;
    }
    
    .hc-generate-btn {
        width: 100%;
        justify-content: center;
    }
}