/**
 * Portfolio Manager Pro - Frontend Styles
 */

/* ==========================================
   CSS Variables
   ========================================== */
:root {
    --pmp-primary: #2271b1;
    --pmp-secondary: #d63638;
    --pmp-text: #1d2327;
    --pmp-text-light: #666;
    --pmp-border: #dcdcde;
    --pmp-bg: #f6f7f7;
    --pmp-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --pmp-radius: 8px;
    --pmp-transition: all 0.3s ease;
}

/* ==========================================
   Product Grid
   ========================================== */
.pmp-products-grid,
.pmp-categories-grid {
    display: grid;
    gap: 24px;
    margin: 20px 0;
}

.pmp-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pmp-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pmp-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {

    .pmp-columns-4,
    .pmp-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {

    .pmp-columns-4,
    .pmp-columns-3,
    .pmp-columns-2 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Product Card
   ========================================== */
.pmp-product-card {
    background: #fff;
    border-radius: var(--pmp-radius);
    box-shadow: var(--pmp-shadow);
    overflow: hidden;
    transition: var(--pmp-transition);
}

.pmp-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pmp-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.pmp-product-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--pmp-bg);
}

.pmp-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pmp-product-card:hover .pmp-product-image img {
    transform: scale(1.05);
}

.pmp-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ccc;
    font-size: 48px;
}

.pmp-product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--pmp-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pmp-product-info {
    padding: 16px;
}

.pmp-product-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--pmp-text);
    line-height: 1.4;
}

.pmp-product-brand {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--pmp-text-light);
}

.pmp-product-price {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--pmp-secondary);
}

/* ==========================================
   Category Card
   ========================================== */
.pmp-category-card {
    background: #fff;
    border-radius: var(--pmp-radius);
    box-shadow: var(--pmp-shadow);
    overflow: hidden;
    transition: var(--pmp-transition);
}

.pmp-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pmp-category-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.pmp-category-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--pmp-bg);
}

.pmp-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pmp-category-card:hover .pmp-category-image img {
    transform: scale(1.05);
}

.pmp-category-image.pmp-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 48px;
}

.pmp-category-info {
    padding: 16px;
}

.pmp-category-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--pmp-text);
}

.pmp-category-count {
    font-size: 13px;
    color: var(--pmp-text-light);
}

/* ==========================================
   Product Detail
   ========================================== */
.pmp-product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .pmp-product-detail {
        grid-template-columns: 1fr;
    }
}

/* Gallery */
.pmp-product-gallery {
    position: sticky;
    top: 20px;
}

.pmp-gallery-main {
    aspect-ratio: 1;
    border-radius: var(--pmp-radius);
    overflow: hidden;
    background: var(--pmp-bg);
    margin-bottom: 12px;
}

.pmp-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pmp-gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pmp-gallery-thumb {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--pmp-transition);
}

.pmp-gallery-thumb:hover,
.pmp-gallery-thumb.active {
    border-color: var(--pmp-primary);
}

.pmp-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Specs */
.pmp-product-specs h2 {
    margin: 0 0 16px;
    font-size: 28px;
    color: var(--pmp-text);
}

.pmp-spec-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--pmp-secondary);
    margin-bottom: 24px;
}

.pmp-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.pmp-specs-table th,
.pmp-specs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--pmp-border);
}

.pmp-specs-table th {
    width: 120px;
    font-weight: 600;
    color: var(--pmp-text-light);
    background: var(--pmp-bg);
}

.pmp-specs-table td {
    color: var(--pmp-text);
}

.pmp-product-description {
    line-height: 1.7;
    color: var(--pmp-text);
}

.pmp-product-description p {
    margin-bottom: 16px;
}

/* ==========================================
   Category Page Header
   ========================================== */
.pmp-category-header {
    margin-bottom: 40px;
}

.pmp-category-banner {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--pmp-radius);
    margin-bottom: 24px;
}

.pmp-category-header h1 {
    margin: 0 0 16px;
    font-size: 32px;
    color: var(--pmp-text);
}

.pmp-category-description {
    line-height: 1.7;
    color: var(--pmp-text-light);
}

.pmp-subcategories {
    margin-bottom: 40px;
}

.pmp-subcategories h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

/* ==========================================
   No Content Messages
   ========================================== */
.pmp-no-products,
.pmp-no-categories {
    text-align: center;
    padding: 40px;
    background: var(--pmp-bg);
    border-radius: var(--pmp-radius);
    color: var(--pmp-text-light);
}

/* ==========================================
   Breadcrumb
   ========================================== */
.pmp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.pmp-breadcrumb a {
    color: var(--pmp-primary);
    text-decoration: none;
}

.pmp-breadcrumb a:hover {
    text-decoration: underline;
}

.pmp-breadcrumb span {
    color: var(--pmp-text-light);
}

.pmp-breadcrumb .separator {
    color: var(--pmp-border);
}