/* Custom CSS for iPhone Plug - Light Theme */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Light Theme Overrides */
.bg-white {
    background-color: #ffffff !important;
}

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

.bg-black {
    background-color: #000000 !important;
}

.text-dark {
    color: #212529 !important;
}

.text-muted {
    color: #000000 !important;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    display: flex;
    align-items: center;
}

.navbar-brand-logo {
    display: block;
    width: auto;
    height: clamp(64px, 12vw, 80px);
    max-width: 62vw;
    object-fit: contain;
}

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

/* Hover Effects */
.hover-primary:hover {
    color: #007bff !important;
    transition: color 0.3s ease;
}

.nav-link {
    transition: color 0.3s ease;
}

/* Modal Styles */
.modal-content {
    border: 1px solid #dee2e6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Form Controls - Light Theme */
.form-control {
    background-color: #f8f9fa !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: #ffffff !important;
    border-color: #007bff !important;
    color: #212529 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control::placeholder {
    color: #000000 !important;
}

.form-label {
    color: #000000 !important;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url("#grain#grain")"/></svg>');
    pointer-events: none;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background-color: #ffffff;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 123, 255, 0.2);
}

.product-card .card-img-top {
    transition: transform 0.3s ease;
    height: 200px;
    object-fit: cover;
}

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

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

/* Footer */
footer {
    margin-top: 80px;
    background-color: #000000 !important;
    border-top: 1px solid #404040;
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #007bff !important;
}

/* Feature Boxes */
.feature-box {
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-10px);
}

.feature-box i {
    color: #007bff;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.feature-box:hover i {
    transform: scale(1.2);
}

/* Filter Section */
.filter-section {
    background-color: #1a1a1a;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid #404040;
}

/* Product List */
.product-list-item {
    border-bottom: 1px solid #404040;
    padding: 1rem 0;
    transition: background-color 0.3s ease;
}

.product-list-item:hover {
    background-color: #ffffff;
}

/* Cart Styles */
.cart-item {
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: #ffffff;
}

/* Quantity Input */
.quantity-input {
    width: 60px;
    text-align: center;
    background-color: #2c2c2c !important;
    border: 1px solid #404040 !important;
    color: #ffffff !important;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #000000;
}

/* Catalog pagination */
.catalog-pagination .pagination {
    flex-wrap: nowrap;
    gap: 0.25rem;
    margin-bottom: 0;
}

.catalog-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0.4rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background-color: #ffffff;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.catalog-pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    border-color: #0d6efd;
    background-color: #eff6ff;
    color: #0b5ed7;
}

.catalog-pagination .page-item.active .page-link {
    border-color: #0d6efd;
    background-color: #0d6efd;
    color: #ffffff;
}

.catalog-pagination .page-item.disabled .page-link {
    border-color: #e2e8f0;
    background-color: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
    opacity: 1;
    pointer-events: none;
}

.catalog-pagination .page-link:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.35);
    outline-offset: 2px;
    box-shadow: none;
}

@media (max-width: 360px) {
    .catalog-pagination .page-link {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
        font-size: 0.8125rem;
    }
}

/* Dropdown Menu */
.dropdown-menu {
    background-color: #1a1a1a;
    border: 1px solid #404040;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
    color: #ffffff;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #007bff;
    color: #ffffff;
}

.dropdown-divider {
    border-color: #404040;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #2c2c2c;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 8px 20px;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .navbar-brand {
        display: flex;
        align-items: center;
        font-size: 1.2rem;
    }
    
    .navbar-brand img {
        height: 50px !important;
        margin-right: 8px;
    }
}

/* Mobile Navigation Styles */
.mobile-user-menu .btn-link {
    text-decoration: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.mobile-user-menu .btn-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.375rem;
}

.mobile-menu-items {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-left: auto;
    margin-right: 0;
    border-radius: 0.5rem !important;
    text-align: right;
}

.mobile-menu-items .dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    margin: 0.25rem 0;
}

.mobile-menu-items .dropdown-item:hover {
    background-color: #007bff !important;
    transform: translateX(-5px);
}

.mobile-menu-items .dropdown-divider {
    margin: 0.5rem 0;
    opacity: 0.5;
}

/* Mobile Accordion Animation */
.mobile-user-menu .collapse {
    transition: all 0.3s ease-in-out;
}

.mobile-user-menu .collapsing {
    transition: height 0.3s ease-in-out;
}

/* Mobile Navigation Improvements */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding-top: 1rem;
    }
    
    .mobile-user-menu {
        width: 100%;
    }
    
    .mobile-menu-items {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}

/* Shared mobile viewport constraints */
html,
body {
    width: 100%;
    max-width: 100%;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

.container,
.container-fluid,
.card,
.card-body,
.modal,
.modal-dialog,
.row {
    min-width: 0;
}

@media (max-width: 576px) {
    .container,
    .container-fluid {
        width: 100%;
        max-width: 100%;
    }

    .row {
        margin-left: 0;
        margin-right: 0;
    }

    .modal-dialog {
        width: calc(100vw - 1rem);
        max-width: calc(100vw - 1rem);
    }

    .card,
    .card-body,
    .input-group,
    .btn-group {
        max-width: 100%;
    }

    .input-group {
        flex-wrap: wrap;
    }

    .input-group > .form-control,
    .input-group > .form-select {
        min-width: 0;
    }

    .table-responsive {
        max-width: 100%;
    }
}
::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #007bff;
}
