:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-light: #f4f7f6;
    --white: #ffffff;
    --border-color: #ddd;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.t2-header {
    background-color: var(--white);
    border-bottom: 2px solid var(--primary-color);
    padding: 15px 0;
}

.t2-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.t2-logo img {
    height: 50px;
    display: block;
}

.t2-search-form {
    flex: 1;
    max-width: 600px;
    display: flex;
}

.t2-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.t2-search-btn {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.t2-cart-btn {
    position: relative;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 24px;
}

.t2-cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--accent-color);
    color: var(--white);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Layout Grid */
.t2-main-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-top: 20px;
}

.t2-category-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .t2-category-layout {
        grid-template-columns: 1fr;
    }
    #categoryFilters {
        display: none; /* Mobile filters could be toggled later */
    }
}

/* Sidebar */
.t2-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.t2-vertical-menu {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: visible;
}

.t2-vertical-menu h3 {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 15px;
    font-size: 16px;
}

.t2-vertical-menu ul {
    list-style: none;
}

.t2-vertical-menu li {
    border-bottom: 1px solid var(--bg-light);
    position: relative;
}

.t2-vertical-menu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    transition: background 0.3s;
}

.t2-vertical-menu a:hover {
    background-color: var(--bg-light);
    color: var(--secondary-color);
}

/* Submenu */
.t2-vertical-menu .has-submenu > .t2-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -1px; /* Align with parent border */
    width: 250px;
    background: #fff;
    border: 1px solid #ddd;
    z-index: 1000;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
}

.t2-vertical-menu .has-submenu:hover > .t2-submenu {
    display: block !important;
}

.t2-vertical-menu .t2-submenu li {
    border-bottom: 1px solid #eee;
}

.t2-vertical-menu .t2-submenu a {
    padding: 8px 15px;
}

.t2-ad-area {
    background-color: #eee;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #666;
    text-align: center;
    padding: 20px;
}

/* Content Area */
.t2-content-area {
    min-width: 0;
}

.t2-slider-section {
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}

/* Product Cards */
.t2-product-grid {
    display: grid;
    gap: 20px;
}

.t2-grid-1 { grid-template-columns: repeat(1, 1fr); }
.t2-grid-2 { grid-template-columns: repeat(2, 1fr); }
.t2-grid-3 { grid-template-columns: repeat(3, 1fr); }
.t2-grid-4 { grid-template-columns: repeat(4, 1fr); }
.t2-grid-5 { grid-template-columns: repeat(5, 1fr); }
.t2-grid-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1200px) {
    .t2-grid-4, .t2-grid-5, .t2-grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .t2-grid-3, .t2-grid-4, .t2-grid-5, .t2-grid-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .t2-product-grid { grid-template-columns: repeat(1, 1fr) !important; gap: 10px; }
}

.t2-product-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.t2-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.t2-product-img {
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
    width: 100%;
}

@media (max-width: 576px) {
    .t2-product-img { height: 140px; }
}

.t2-product-title {
    font-size: 14px;
    font-weight: 600;
    height: 40px;
    overflow: hidden;
    margin-bottom: 10px;
    color: var(--text-color);
    text-decoration: none;
}

.t2-product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.t2-product-actions {
    margin-bottom: 15px;
}

.t2-qty-input {
    width: 60px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    margin-right: 5px;
}

.t2-add-to-cart-btn {
    padding: 8px 15px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.t2-add-to-cart-btn:hover {
    background-color: #2980b9;
}

.t2-view-btn {
    display: block;
    text-align: center;
    padding: 8px;
    background-color: #f8f9fa;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
    border: 1px solid var(--border-color);
}

.t2-view-btn:hover {
    background-color: #e9ecef;
}

/* Breadcrumb */
.t2-breadcrumb {
    display: flex;
    list-style: none;
    padding: 15px 20px;
    background: var(--white);
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

.t2-breadcrumb li + li::before {
    content: "/";
    padding: 0 10px;
    color: #ccc;
}

.t2-breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
}

.t2-breadcrumb a:hover {
    text-decoration: underline;
}

.t2-breadcrumb span {
    color: #777;
}

/* White Card */
.white-card {
    background-color: var(--white);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.p-20 { padding: 20px; }
.mb-20 { margin-bottom: 20px; }

/* Footer */
.t2-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 40px;
}

.t2-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.t2-footer h4 {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.t2-footer ul {
    list-style: none;
}

.t2-footer li {
    margin-bottom: 10px;
}

.t2-footer a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
}

.t2-footer a:hover {
    color: var(--white);
}

.t2-footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 13px;
    color: #999;
}

/* Helper Classes */
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }
.white-card { background: #fff; border-radius: 4px; border: 1px solid #ddd; }
