/* --- PRODUCT PAGE VARIABLES --- */
:root {
    --bg-body: #F9F9F9;
    /* Clean light gray */
    --text-main: #222222;
    --text-muted: #666666;
    --accent: #B85C38;
    --white: #ffffff;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.08);
    --product-transition: cubic-bezier(0.25, 1, 0.5, 1);
}

body {
    background-color: var(--bg-body);
}

/* --- PAGE HEADER --- */
.page-header {
    height: 60vh;
    background: url('https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?q=80&w=2000&auto=format&fit=crop') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 60px;
}

.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.page-header-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    padding: 0 20px;
}

.page-title {
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 10px;
    font-family: 'Clash Display', sans-serif;
}

.breadcrumb {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 10px;
}


/* --- PAGE LAYOUT --- */
.page-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    /* Reduced sidebar width from 280px */
    gap: 30px;
    /* Reduced gap from 40px */
    padding-bottom: 80px;
    align-items: start;
}

/* --- SIDEBAR (Clean Card Style) --- */
.sidebar {
    position: sticky;
    top: 90px;
    background: var(--white);
    padding: 20px;
    /* Reduced padding */
    border-radius: var(--radius-md);
    /* Slightly smaller radius */
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.sidebar-title {
    font-size: 0.8rem;
    /* Smaller font */
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.cat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* Tighter gap */
}

.cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    /* Reduced padding */
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.85rem;
    /* Smaller font */
    transition: 0.2s var(--product-transition);
    background: transparent;
    text-decoration: none;
    /* Remove underline */
}

/* Hover/Active */
.cat-link:hover {
    background: #f5f5f5;
    color: var(--accent);
}

.cat-link.active {
    background: rgba(184, 92, 56, 0.08);
    /* Light accent bg */
    color: var(--accent);
    font-weight: 600;
}

.cat-link i {
    font-size: 0.8rem;
    opacity: 0.5;
    transition: 0.2s;
}

.cat-link:hover i,
.cat-link.active i {
    opacity: 1;
}


/* --- PRODUCT GRID (Modern Card) --- */
.product-grid {
    display: grid;
    /* Force 4 columns on large screens, auto-fit on smaller */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    /* Reduced gap from 30px */
}

/* Responsiveness for grid */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    /* Smaller radius */
    overflow: hidden;
    position: relative;
    transition: 0.4s var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.pc-img-box {
    height: 180px;
    /* Reduced specific height from 240px */
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

.pc-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s var(--product-transition);
}

.product-card:hover .pc-img-box img {
    transform: scale(1.08);
}

/* Floating Share Button */
/* Hidden by default, slides up on hover */
.pc-share-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    z-index: 2;
    color: var(--text-main);
}

.product-card:hover .pc-share-btn {
    opacity: 1;
    transform: translateY(0);
}

.pc-share-btn:hover {
    background: var(--accent);
    color: var(--white);
}

.pc-content {
    padding: 15px;
    /* Reduced padding */
    flex-grow: 1;
    /* Pushes footer down */
    display: flex;
    flex-direction: column;
}

.pc-cat {
    font-size: 0.65rem;
    /* Smaller font */
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}

.pc-title {
    font-size: 0.95rem;
    /* Smaller font */
    font-family: 'Clash Display', sans-serif;
    color: var(--text-main);
    margin-bottom: 5px;
    line-height: 1.3;
}

.pc-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 15px;
    /* Multiline clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.8;
}

.pc-footer {
    padding: 15px 0px;
    border-top: 1px solid #f5f5f5;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
}

.pc-footer a {
    text-decoration: none;

}

.view-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    transition: 0.3s;
}

.view-btn span {
    position: relative;
}

/* Underline effect */
.view-btn span::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: 0.3s;
}

.product-card:hover .view-btn span {
    color: var(--accent);
}

.product-card:hover .view-btn span::after {
    width: 100%;
}

.view-btn i {
    transform: translateX(0);
    transition: 0.3s;
    color: var(--text-muted);
}

.product-card:hover .view-btn i {
    transform: translateX(5px);
    color: var(--accent);
}


/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 240px 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .page-layout {
        grid-template-columns: 1fr;
        display: block;
    }

    .sidebar {
        position: relative;
        top: 0;
        margin-bottom: 40px;
    }

    /* Horizontal scroll for tags on mobile if needed, or simple stacking */
    .cat-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .sidebar-title {
        margin-bottom: 15px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .page-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .cat-list {
        grid-template-columns: 1fr;
    }
}