/* ============================================
   MOTOR EXPERT - Shop Styles
   Product catalog, categories, filters
   ============================================ */

/* =============================================
   PAGE HEADER (same as courses)
   ============================================= */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 60px 20px 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23ffffff"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%23ffffff"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23ffffff"/></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.08;
    pointer-events: none;
}

.page-header > * {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: var(--white);
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 12px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header p {
    opacity: 0.9;
    font-size: 17px;
    margin-bottom: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
}

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

.breadcrumb span {
    opacity: 0.7;
}

/* =============================================
   CATEGORIES SECTION
   ============================================= */
.shop-categories {
    padding: 50px 20px 30px;
    background: var(--gray-50);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--gray-800);
    position: relative;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.category-card:hover,
.category-card.active {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(45, 138, 78, 0.15);
    border-color: var(--primary);
}

.category-card.active {
    background: var(--primary);
    color: var(--white);
}

.category-card-icon {
    font-size: 36px;
    margin-bottom: 10px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-icon img {
    max-height: 45px;
    max-width: 60px;
    object-fit: contain;
}

.category-card-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.category-card-count {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.category-card.active .category-card-count {
    color: rgba(255, 255, 255, 0.8);
}

/* Category tooltip on hover */
.category-card-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--gray-900);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    width: max-content;
    max-width: 250px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.category-card-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--gray-900);
}

.category-card:hover .category-card-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.skeleton-card {
    pointer-events: none;
}

/* =============================================
   PRODUCTS SECTION
   ============================================= */
.shop-products {
    padding: 30px 20px 80px;
    background: var(--gray-50);
}

/* Filters */
.shop-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.shop-filters-left {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 10px 15px;
    min-width: 250px;
    transition: border-color 0.2s;
}

.filter-search:focus-within {
    border-color: var(--primary);
}

.filter-search svg {
    color: var(--gray-400);
    flex-shrink: 0;
}

.filter-search input {
    border: none;
    background: none;
    outline: none;
    font-size: 15px;
    width: 100%;
}

.filter-category select {
    padding: 12px 35px 12px 15px;
    font-size: 15px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filter-category select:focus {
    outline: none;
    border-color: var(--primary);
}

.products-count {
    color: var(--gray-500);
    font-size: 14px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(45, 95, 63, 0.15);
    border-color: var(--primary);
}

.product-card-image {
    height: 200px;
    background: var(--gray-100);
    background-size: cover;
    background-position: center;
    position: relative;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.featured {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: var(--white);
}

.product-badge.available {
    background: #dcfce7;
    color: #166534;
}

.product-badge.on-order {
    background: #fef3c7;
    color: #92400e;
}

.product-badge.unavailable {
    background: var(--gray-200);
    color: var(--gray-600);
}

.product-card-body {
    padding: 20px;
}

.product-card-category {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-card-description {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
}

.product-card-price small {
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-500);
}

.product-card-price.on-request {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
}

.product-card-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.product-card-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Empty State */
.products-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 12px;
}

.products-empty-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.products-empty h3 {
    font-size: 20px;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.products-empty p {
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* =============================================
   PRODUCT DETAIL MODAL
   ============================================= */
/* Modal overridy (základ v components.css) */
.modal {
    max-width: 900px;
}

.modal-header,
.modal-header * {
    color: var(--white);
}

.modal-header .product-card-category {
    color: rgba(255, 255, 255, 0.8) !important;
}

.modal-header h2 {
    color: var(--white) !important;
}

.modal-footer {
    justify-content: space-between;
    align-items: center;
}

/* Product Detail Content */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.product-gallery {
    position: relative;
}

.product-main-image {
    width: 100%;
    height: 350px;
    object-fit: contain;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 15px;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--primary);
}

.product-info h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.product-info-category {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.product-info-description {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 25px;
}

.product-specs {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.product-specs h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-specs-list {
    display: grid;
    gap: 10px;
}

.product-spec-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.product-spec-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.product-spec-label {
    color: var(--gray-500);
}

.product-spec-value {
    color: var(--gray-800);
    font-weight: 500;
}

.product-price-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.product-price-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 3px;
}

.product-price-value {
    font-size: 22px;
    font-weight: 700;
}

.product-price-note {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 3px;
}

.product-documents {
    margin-top: 20px;
}

.product-documents h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.product-document-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
}

.product-document-link:hover {
    text-decoration: underline;
}

/* Full Description Section */
.product-full-description {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-200);
}

.product-full-description h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 15px;
}

.product-full-description-content {
    color: var(--gray-700);
    font-size: 15px;
    line-height: 1.8;
}

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

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

.product-full-description-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.product-full-description-content li {
    margin-bottom: 8px;
    position: relative;
}

.product-full-description-content li::marker {
    color: var(--primary);
}

.product-full-description-content strong {
    color: var(--gray-900);
}

/* =============================================
   CTA SECTION
   ============================================= */
.shop-cta {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
}

.shop-cta h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.shop-cta p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 25px;
}

.shop-cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================
   FOOTER (same as homepage)
   ============================================= */
.footer {
    background-color: #2d2d2d;
    color: #ccc;
    padding: 60px 20px 30px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    margin-top: 15px;
    line-height: 1.7;
    font-size: 14px;
}

.footer h4 {
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid #444;
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* =============================================
   SKELETON
   ============================================= */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .product-main-image {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .shop-hero-title {
        font-size: 32px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-card {
        min-height: 110px;
        padding: 18px 12px;
    }
    
    .category-card-icon {
        font-size: 28px;
    }
    
    .category-card-name {
        font-size: 13px;
    }
    
    .category-card-tooltip {
        display: none;
    }
    
    .shop-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .shop-filters-left {
        flex-direction: column;
    }
    
    .filter-search {
        min-width: auto;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .product-full-description-content {
        font-size: 14px;
    }
}