/* E-Commerce Store CSS */

/* Variables */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333333;
    --bg-color: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
}

/* 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: var(--text-color);
    background-color: transparent;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    background-color: transparent;
}

/* Top Bar */
.top-bar {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 8px 0;
    font-size: 14px;
}

.top-bar-left span,
.top-bar-right span,
.top-bar-right a {
    margin-right: 15px;
    color: var(--light-color);
    text-decoration: none;
}

.top-bar-right a:hover {
    color: var(--primary-color);
}

/* Header */
.main-header {
    background-color: var(--bg-color);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.logo img {
    max-height: 50px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 24px;
    margin: 0;
    font-weight: bold;
}

.search-bar .form-control {
    border-radius: 25px 0 0 25px;
    border-right: none;
    padding: 12px 20px;
}

.search-bar .btn {
    border-radius: 0 25px 25px 0;
    padding: 12px 20px;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.action-item {
    margin-left: 20px;
}

.action-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    transition: color 0.3s;
}

.action-link:hover {
    color: var(--primary-color);
}

.action-link i {
    font-size: 20px;
    margin-bottom: 5px;
}

.action-link span {
    font-size: 12px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Navigation */
.main-nav {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu li {
    position: relative;
}

.main-menu a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    transition: background-color 0.3s;
}

.main-menu a:hover,
.main-menu li:hover > a {
    background-color: rgba(255, 255, 255, 0.1);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.main-menu li:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    display: block;
}

.submenu a {
    color: var(--text-color);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.submenu a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Breadcrumb */
.breadcrumb-section {
    background-color: var(--light-color);
    padding: 15px 0;
}

.breadcrumb {
    background: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--text-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 400px;
    min-height: 400px;
    overflow: hidden;
    margin-bottom: 40px;
}

.hero-carousel {
    height: 100%;
    min-height: 400px;
}

.carousel-inner {
    height: 100%;
    min-height: 400px;
    position: relative;
}

.carousel-item {
    height: 100% !important;
    min-height: 400px !important;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    min-height: 400px !important;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 20px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

/* Product Cards */
.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.badge {
    background-color: var(--danger-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.badge.new {
    background-color: var(--success-color);
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.action-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    box-shadow: var(--shadow);
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #28a745 !important;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-title:hover {
    color: #218838 !important;
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.current-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.original-price {
    font-size: 14px;
    color: var(--secondary-color);
    text-decoration: line-through;
    margin-left: 8px;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.stars {
    color: #ffc107;
    margin-right: 5px;
}

.rating-count {
    font-size: 12px;
    color: var(--secondary-color);
}

.product-footer {
    margin-top: auto;
}

.add-to-cart-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 500;
}

.add-to-cart-btn:hover {
    background-color: #0056b3;
}

/* Category Cards */
.category-card {
    position: relative;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    cursor: pointer;
    transition: transform 0.3s;
}

.category-card:hover {
    transform: scale(1.02);
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.category-name {
    color: white;
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

/* Newsletter Section */
.newsletter-section {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0;
    margin: 40px 0;
}

.newsletter-section h3 {
    margin-bottom: 15px;
}

.newsletter-section p {
    margin-bottom: 0;
}

.newsletter-form .form-control {
    border-radius: 25px 0 0 25px;
    border: none;
    padding: 12px 20px;
}

.newsletter-form .btn {
    border-radius: 0 25px 25px 0;
    padding: 12px 20px;
    border: none;
}

/* Footer */
.main-footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 40px 0 20px;
}

.footer-widget h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    line-height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: #0056b3;
}

.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 30px;
    padding-top: 20px;
    color: rgba(255,255,255,0.7);
}

.payment-methods i {
    font-size: 24px;
    margin-left: 10px;
    color: var(--light-color);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #0056b3;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    z-index: 1000;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 10px;
}

.section-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-color);
}

.section-subtitle {
    font-size: 16px;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Alerts */
.alert {
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-light {
    background-color: transparent !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

/* Floating Messages */
.floating-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    max-width: 350px;
}

.floating-message.show {
    transform: translateX(0);
}

.floating-message-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-left: 4px solid #1e7e34;
}

.floating-message-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-left: 4px solid #bd2130;
}

.floating-message i {
    margin-right: 8px;
    font-size: 18px;
}

/* Cart Page Styles */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Product Detail Page Actions - visible buttons (not overlay) */
.product-detail-actions {
    position: static !important;
    opacity: 1 !important;
    z-index: auto !important;
}

.product-detail-actions .action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.product-detail-actions .action-buttons .btn {
    border-radius: 50px !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.5rem !important;
}

.product-detail-actions .action-buttons #add-to-cart-btn {
    background: #5F9E73 !important;
    border: 2px solid #5F9E73 !important;
    color: #ffffff !important;
}

.product-detail-actions .action-buttons #add-to-cart-btn:hover {
    background: #4a8a5f !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(95, 158, 115, 0.3) !important;
}

.product-detail-actions .action-buttons #buy-now-btn {
    background: #ffffff !important;
    border: 2px solid #5F9E73 !important;
    color: #5F9E73 !important;
}

.product-detail-actions .action-buttons #buy-now-btn:hover {
    background: #5F9E73 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(95, 158, 115, 0.3) !important;
}

.product-detail-actions .action-buttons #wishlist-btn {
    background: #ffffff !important;
    border: 2px solid #dc3545 !important;
    color: #dc3545 !important;
}

.product-detail-actions .action-buttons #wishlist-btn:hover {
    background: #dc3545 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}
