/**
 * HoReCa Product Widgets - Frontend Styles
 */

/* Base font */
.hpw-brand-widget,
.hpw-attributes-widget,
.hpw-gallery-widget,
.hpw-documents-widget,
.hpw-articles-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

.hpw-brand-widget *,
.hpw-attributes-widget *,
.hpw-gallery-widget *,
.hpw-documents-widget *,
.hpw-articles-widget * {
    box-sizing: border-box;
}

/* ===== BRAND WIDGET ===== */
.hpw-brand-widget {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hpw-brand-image {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hpw-brand-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hpw-brand-placeholder {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
}

.hpw-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hpw-brand-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.hpw-brand-subtitle {
    font-size: 13px;
    color: #999;
    line-height: 1.3;
}

/* ===== ATTRIBUTES WIDGET ===== */
.hpw-attributes-widget {
    width: 100%;
}

.hpw-attributes-table {
    width: 100%;
}

.hpw-attributes-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.hpw-attributes-row:last-child {
    border-bottom: none;
}

.hpw-attributes-header {
    font-weight: 600;
}

.hpw-attr-label {
    flex: 0 0 50%;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.hpw-attr-value {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.hpw-attributes-button-wrapper {
    margin-top: 15px;
}

.hpw-attributes-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.hpw-attributes-button:hover {
    background-color: #e8e8e8;
    text-decoration: none;
    color: #333;
}

.hpw-attributes-button svg {
    flex-shrink: 0;
}

/* ===== GALLERY WIDGET ===== */
.hpw-gallery-widget {
    width: 100%;
}

.hpw-gallery-main-wrapper {
    position: relative;
}

.hpw-gallery-main {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hpw-gallery-main img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: opacity 0.3s ease;
}

.hpw-gallery-placeholder {
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
}

/* Labels */
.hpw-gallery-label {
    position: absolute;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    white-space: nowrap;
}

.hpw-gallery-label.top-left {
    top: 10px;
    left: 10px;
}

.hpw-gallery-label.top-right {
    top: 10px;
    right: 10px;
}

.hpw-gallery-label.bottom-left {
    bottom: 10px;
    left: 10px;
}

.hpw-gallery-label.bottom-right {
    bottom: 10px;
    right: 10px;
}

/* Thumbnails */
.hpw-gallery-thumbs-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.hpw-gallery-thumbs {
    flex: 1;
    overflow: hidden;
}

.hpw-gallery-thumbs-inner {
    display: flex;
    gap: 10px;
    transition: transform 0.3s ease;
}

.hpw-gallery-thumb {
    width: 70px;
    height: 70px;
    min-width: 70px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hpw-gallery-thumb:hover {
    border-color: #ddd;
}

.hpw-gallery-thumb.active {
    border-color: #3498db;
}

.hpw-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hpw-thumb-placeholder {
    font-size: 8px;
    color: #999;
    text-transform: uppercase;
}

/* Arrows */
.hpw-gallery-arrow {
    width: 30px;
    height: 30px;
    min-width: 30px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    transition: all 0.2s ease;
}

.hpw-gallery-arrow:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.hpw-gallery-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== DOCUMENTS WIDGET ===== */
.hpw-documents-widget {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 0;
}

.hpw-documents-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.hpw-documents-list {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
}

.hpw-document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hpw-document-item:hover {
    background-color: #f5f5f5;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hpw-document-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hpw-document-icon svg {
    width: 24px;
    height: 24px;
    fill: #00d4d4;
}

.hpw-document-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* ===== ARTICLES WIDGET ===== */
.hpw-articles-widget {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 0;
}

.hpw-articles-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

/* List Layout */
.hpw-articles-list {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
}

.hpw-article-item-list {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hpw-article-item-list:hover {
    background-color: #f5f5f5;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hpw-article-item-list .hpw-article-thumb {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background-color: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.hpw-article-item-list .hpw-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hpw-article-item-list .hpw-article-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Grid Layout */
.hpw-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.hpw-article-item-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hpw-article-item-grid:hover {
    background-color: #f5f5f5;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hpw-article-item-grid .hpw-article-thumb {
    width: 100%;
    height: 120px;
    background-color: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.hpw-article-item-grid .hpw-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hpw-article-item-grid .hpw-article-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: normal;
}

/* No content messages */
.hpw-no-documents,
.hpw-no-articles {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* ===== DESCRIPTION ACCORDION WIDGET ===== */
.hpw-description-accordion {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: transparent;
    border-radius: 0;
    overflow: hidden;
}

.hpw-description-header {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 15px 0;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    border-bottom-style: solid;
    transition: opacity 0.2s ease;
    user-select: none;
}

.hpw-description-header:hover {
    opacity: 0.7;
}

.hpw-description-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px !important;
    font-weight: 600;
    color: #333;
    line-height: 16px;
    margin: 0;
    padding: 0;
    display: inline-block;
    vertical-align: middle;
}

.hpw-description-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    line-height: 16px;
    vertical-align: middle;
}

.hpw-description-icon svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: #333;
    transition: transform 0.3s ease;
}

.hpw-description-accordion.is-expanded .hpw-description-icon svg {
    transform: rotate(180deg);
}

.hpw-description-content-wrapper {
    overflow: hidden;
}

.hpw-description-content {
    padding: 20px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.hpw-description-content p {
    margin: 0 0 15px 0;
}

.hpw-description-content p:last-child {
    margin-bottom: 0;
}

.hpw-description-content ul,
.hpw-description-content ol {
    margin: 0 0 15px 20px;
    padding: 0;
}

.hpw-description-content li {
    margin-bottom: 5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Gallery */
    .hpw-gallery-main {
        height: 300px;
    }
    
    .hpw-gallery-thumb {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }
    
    /* Articles Grid */
    .hpw-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hpw-article-item-grid .hpw-article-thumb {
        height: 100px;
    }
}

@media (max-width: 480px) {
    /* Brand */
    .hpw-brand-image {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .hpw-brand-name {
        font-size: 14px;
    }
    
    .hpw-brand-subtitle {
        font-size: 12px;
    }
    
    /* Attributes */
    .hpw-attr-label,
    .hpw-attr-value {
        font-size: 13px;
    }
    
    .hpw-attributes-button {
        width: 100%;
        justify-content: center;
    }
    
    /* Gallery */
    .hpw-gallery-main {
        height: 250px;
        border-radius: 8px;
    }
    
    .hpw-gallery-thumb {
        width: 50px;
        height: 50px;
        min-width: 50px;
        border-radius: 6px;
    }
    
    .hpw-gallery-arrow {
        width: 26px;
        height: 26px;
        min-width: 26px;
        font-size: 14px;
    }
    
    /* Documents */
    .hpw-documents-widget {
        padding: 15px;
    }
    
    .hpw-document-item {
        padding: 10px 12px;
        border-radius: 12px;
    }
    
    .hpw-document-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .hpw-document-name {
        font-size: 13px;
    }
    
    /* Articles */
    .hpw-articles-widget {
        padding: 15px;
    }
    
    .hpw-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .hpw-article-item-list {
        padding: 10px 12px;
        border-radius: 12px;
    }
    
    .hpw-article-item-list .hpw-article-thumb {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }
    
    .hpw-article-item-list .hpw-article-name {
        font-size: 13px;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .hpw-article-item-grid {
        flex-direction: row;
        align-items: center;
        padding: 12px;
    }
    
    .hpw-article-item-grid .hpw-article-thumb {
        width: 80px;
        height: 80px;
        min-width: 80px;
    }
    
    .hpw-article-item-grid .hpw-article-name {
        font-size: 13px;
    }
    
    /* Description Accordion */
    .hpw-description-header {
        padding: 12px 0;
    }
    
    .hpw-description-title {
        font-size: 13px;
    }
    
    .hpw-description-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .hpw-description-content {
        padding: 15px 0;
        font-size: 13px;
    }
}
