/* TOPOGEOS E-SHOP STYLES */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0066cc;
    color: white;
}

.btn-primary:hover {
    background-color: #0052a3;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-outline:hover {
    background-color: #0066cc;
    color: white;
    text-decoration: none;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    text-decoration: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo a {
    text-decoration: none;
    color: #333;
}

.logo h1 {
    margin: 0;
    color: #0066cc;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo .tagline {
    font-size: 0.875rem;
    color: #666;
    display: block;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
}

.main-nav a:hover {
    color: #0066cc;
    text-decoration: none;
}

.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
}

.submenu li {
    margin: 0;
}

.submenu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
}

.submenu a:hover {
    background-color: #f8f9fa;
    color: #0066cc;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
}

.search-form {
    display: flex;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px 0 0 6px;
    width: 200px;
}

.search-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 6px 6px 0;
    background: #f8f9fa;
    cursor: pointer;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-link {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.lang-link.active {
    background-color: #0066cc;
    color: white;
}

.cart-widget .cart-link {
    position: relative;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Flash Messages */
.flash-messages {
    padding: 1rem 0;
}

.flash {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Grids */
.categories-grid,
.products-grid,
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Cards */
.category-card,
.product-card,
.brand-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover,
.product-card:hover,
.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.category-card a,
.product-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-image,
.product-image,
.brand-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-hero-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.category-placeholder,
.product-placeholder,
.brand-placeholder,
.no-image {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #666;
}

.category-info,
.product-info,
.brand-info {
    padding: 1.5rem;
}

.category-info h3,
.product-info h3,
.brand-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.product-subtitle,
.brand-description {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.product-price {
    margin-bottom: 0.5rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0066cc;
}

.old-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.contact-price {
    color: #0066cc;
    font-weight: 500;
}

.product-brand,
.product-category,
.category-count {
    color: #666;
    font-size: 0.875rem;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: #666;
}

.breadcrumb .separator {
    color: #ccc;
}

.breadcrumb a {
    color: #0066cc;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #666;
}

/* Product Page */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-images .main-image {
    margin-bottom: 1rem;
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.image-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.thumbnail.active,
.thumbnail:hover {
    opacity: 1;
}

.product-header {
    margin-bottom: 2rem;
}

.product-sku {
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.product-stock {
    margin: 1rem 0;
}

.in-stock {
    color: #28a745;
    font-weight: 500;
}

.out-of-stock {
    color: #dc3545;
    font-weight: 500;
}

.product-downloads {
    margin-top: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.product-downloads h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.product-downloads ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-downloads li {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.product-downloads li:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.product-downloads a {
    display: flex;
    align-items: center;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
}

.product-downloads a:hover {
    color: #3498db;
}

.product-downloads a::before {
    content: "📄";
    font-size: 1.5rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.product-downloads small {
    display: block;
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.downloads-info {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.download-icon {
    margin-left: auto;
    font-size: 1.2rem;
    opacity: 0.7;
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.file-type {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.file-size {
    color: #999;
    font-size: 0.75rem;
}

/* Product Tabs */
.product-tabs {
    margin-top: 3rem;
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.spec-label {
    font-weight: 600;
    width: 30%;
}

/* Search */
.search-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-input-group {
    display: flex;
    flex: 1;
    min-width: 300px;
}

.search-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-filters select,
.search-filters input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.results-header {
    margin-bottom: 2rem;
}

.results-count {
    color: #0066cc;
    font-weight: 600;
}

.search-query {
    color: #666;
    margin-top: 0.5rem;
}

.no-results,
.no-products,
.no-brands {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results ul {
    text-align: left;
    display: inline-block;
    margin-top: 1rem;
}

/* Cart */
.cart-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.cart-table table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-sku {
    font-size: 0.875rem;
    color: #666;
}

.quantity-input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cart-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cart-summary {
    display: flex;
    justify-content: flex-end;
}

.summary-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    width: 400px;
}

.summary-card h3 {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-line.total {
    font-size: 1.125rem;
    font-weight: 600;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

.checkout-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

/* Checkout */
.checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.form-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-section h2 {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: #0066cc;
    background-color: #f8f9fa;
}

.payment-option input[type="radio"] {
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.payment-label {
    display: flex;
    flex-direction: column;
}

.payment-label small {
    color: #666;
    margin-top: 0.25rem;
}

.order-summary-section {
    position: sticky;
    top: 120px;
}

.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 500;
}

.item-sku {
    font-size: 0.875rem;
    color: #666;
}

.item-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.item-quantity {
    color: #666;
}

.item-price {
    font-weight: 500;
}

.checkout-success {
    text-align: center;
    padding: 4rem 2rem;
}

.success-message {
    max-width: 600px;
    margin: 0 auto;
}

.success-message h1 {
    color: #28a745;
    margin-bottom: 1rem;
}

.order-number {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.order-summary {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #0066cc;
}

.pagination .active a {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Footer */
.site-footer {
    background-color: #333;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
}

.footer-section a:hover {
    color: white;
    text-decoration: none;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #ccc;
}

/* Error Pages */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-content h1 {
    font-size: 6rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-content h2 {
    margin-bottom: 1rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .categories-grid,
    .products-grid,
    .brands-grid {
        grid-template-columns: 1fr;
    }
    
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .order-summary-section {
        position: static;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-input-group {
        min-width: auto;
    }
    
    .cart-table {
        overflow-x: auto;
    }
    
    .cart-table table {
        min-width: 600px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .tab-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .error-content h1 {
        font-size: 4rem;
    }
    
    .categories-grid,
    .products-grid,
    .brands-grid {
        gap: 1rem;
    }
    
    .category-info,
    .product-info,
    .brand-info {
        padding: 1rem;
    }
}

/* Video Styles */
.product-videos {
    margin-top: 2rem;
}

.videos-list {
    display: grid;
    gap: 2rem;
}

.video-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.video-item video {
    border-radius: 6px;
    margin-bottom: 1rem;
}

.video-item h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.video-item p {
    margin: 0;
    color: #666;
    font-size: 0.875rem;
}

/* Admin Media Styles */
.media-file-input {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.media-file-input h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1rem;
}

.media-file-input .form-row {
    margin-bottom: 1rem;
}

.media-file-input label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.875rem;
}

.media-file-input input,
.media-file-input textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
}

.media-file-input input:focus,
.media-file-input textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}
