/* FastBy Webbshop Styling */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 80px;
    border-radius: 8px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.header-nav a:hover {
    background-color: #34495e;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
}

/* Main Layout */
.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    flex: 1;
}

/* Sidebar Menu */
.sidebar {
    width: 250px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.sidebar h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.category-menu {
    list-style: none;
}

.category-menu li {
    margin-bottom: 10px;
}

.category-menu a {
    display: block;
    padding: 10px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.category-menu a:hover,
.category-menu a.active {
    background-color: #3498db;
    color: white;
}

.subcategory {
    margin-left: 20px;
    margin-top: 5px;
}

/* News Feed Sidebar */
.news-feed {
    width: 280px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.news-feed h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.news-item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 3px solid #3498db;
    transition: all 0.3s;
}

.news-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(2px);
}

.news-item-clickable {
    cursor: pointer;
}

.news-item-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

.news-item-content {
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.news-item-date {
    color: #999;
    font-size: 11px;
    margin-top: 8px;
}

.subcategory a {
    font-size: 14px;
    padding: 8px 10px;
}

/* Main Content */
.main-content {
    flex: 1;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 5px;
    background-color: #ecf0f1;
    padding: 4px;
    border-radius: 6px;
}

.view-btn {
    padding: 8px 12px;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #7f8c8d;
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    color: #2c3e50;
    background-color: #d5dbdb;
}

.view-btn.active {
    background-color: #3498db;
    color: white;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* Products List */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.products-list .product-item {
    display: flex;
    flex-direction: row;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.products-list .product-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.products-list .product-image-wrapper {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
}

.products-list .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.products-list .product-info {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.products-list .product-name {
    font-size: 20px;
    margin-bottom: 10px;
}

.products-list .product-description {
    flex: 1;
    margin-bottom: 10px;
}

/* Products Grid - Card Style */
.products-grid .product-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.products-grid .product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.products-grid .product-image-wrapper {
    width: 100%;
    height: 250px;
}

.products-grid .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.product-price {
    font-size: 20px;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
    font-size: 14px;
    font-weight: bold;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

/* Cart */
.cart-table {
    width: 100%;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-table table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background-color: #2c3e50;
    color: white;
    font-weight: bold;
}

.cart-total {
    text-align: right;
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

/* Admin Styles */
.admin-nav {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-nav a {
    margin-right: 20px;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.admin-nav a:hover {
    text-decoration: underline;
}

.admin-table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background-color: #2c3e50;
    color: white;
    font-weight: bold;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

/* Messages */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: border-color 0.3s;
}

.color-option:hover,
.color-option.selected {
    border-color: #3498db;
    border-width: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .products-list .product-item {
        flex-direction: column;
    }
    
    .products-list .product-image-wrapper {
        width: 100%;
        height: 200px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 20px;
    margin-top: auto;
    text-align: center;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    margin: 0 15px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer p {
    margin: 5px 0;
    font-size: 14px;
    color: #bdc3c7;
}
