/* Custom Styles for Backlit Acrylic Designs */

:root {
    --primary-color: #00A0E3;
    --secondary-color: #FF9933;
    --success-color: #059669;
    --warning-color: #FF9933;
    --danger-color: #dc2626;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --gradient-primary: linear-gradient(135deg, #00A0E3 0%, #0080B8 100%);
    --gradient-secondary: linear-gradient(135deg, #FF9933 0%, #FF7700 100%);
    --gradient-accent: linear-gradient(135deg, #00A0E3 0%, #FF9933 100%);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    margin-left: 0.125rem;
    border-radius: 0.375rem;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu > .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-submenu > .dropdown-item::after {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

@media (max-width: 991.98px) {
    .dropdown-submenu .dropdown-menu {
        position: static;
        float: none;
        margin-left: 1rem;
        display: none;
    }
    
    .dropdown-submenu .dropdown-menu.show {
        display: block;
    }
    
    .dropdown-submenu > .dropdown-item::after {
        content: "\f078";
    }
}

/* Hero Section */
.hero-slide {
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

.hero-slide h1 {
    animation: slideInUp 0.8s ease-out;
}

.hero-slide p {
    animation: slideInUp 1s ease-out;
}

.hero-slide .btn {
    animation: slideInUp 1.2s ease-out;
}

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

.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
}

/* Video Hero Styles */
.hero-video {
    position: relative;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
    z-index: 1;
}

.hero-video .container {
    z-index: 2;
}

/* Background Utilities */
.bg-gradient-light {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Category Cards */
.category-card {
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: none;
    overflow: hidden;
    position: relative;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.category-card a {
    color: inherit;
}

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

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

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

.category-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    transition: background 0.3s ease;
}

.category-card:hover .category-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
}

.category-content {
    text-align: left;
}

.category-title {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.category-description {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Legacy support for icon-based categories */
.category-icon {
    transition: transform 0.3s ease;
}

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

/* Product Cards */
.product-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

.product-image img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

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

.product-badges .badge {
    display: block;
    margin-bottom: 5px;
}

/* Live Preview */
.live-preview-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#preview-canvas {
    pointer-events: none;
    border-radius: 12px;
}

.product-preview-container {
    position: sticky;
    top: 20px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: var(--gradient-secondary);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #ed64a6 0%, #f093fb 100%);
    transform: translateY(-2px);
}

/* Pricing Display */
.price-display {
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    text-align: center;
}

/* Feature Boxes */
.feature-box {
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

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

.feature-box i {
    transition: transform 0.3s ease;
}

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

/* Testimonial Section */
.testimonials-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
}

.testimonials-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.testimonials-track {
    display: flex;
    gap: 30px;
    animation: scroll-testimonials 40s linear infinite;
    width: fit-content;
}

.testimonials-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-testimonials {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.testimonial-card-modern {
    flex: 0 0 400px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.testimonial-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.testimonial-card-modern:hover::before {
    transform: scaleX(1);
}

.testimonial-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.testimonial-content .stars {
    color: #ffc107;
    font-size: 1rem;
    letter-spacing: 2px;
}

.testimonial-content blockquote {
    font-style: italic;
    line-height: 1.8;
    color: #555;
    font-size: 0.95rem;
    margin: 15px 0 20px;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--primary-color);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 160, 227, 0.3);
}

.testimonial-author h6 {
    margin: 0;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1rem;
}

.testimonial-author small {
    color: #888;
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .testimonial-card-modern {
        flex: 0 0 320px;
        padding: 25px;
    }

    .testimonials-track {
        gap: 20px;
    }

    @keyframes scroll-testimonials {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}

/* Process Section */
.process-step {
    padding: 1rem;
}

.process-number {
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.process-step h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* About Section */
.stat-box {
    padding: 1rem;
}

.stat-box h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.about-image .bg-primary {
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

/* Cart Styles */
.cart-items .card {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.cart-items .card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.unit-price {
    font-size: 0.875rem;
}

.total-price {
    font-size: 1.25rem;
}

/* Checkout Styles */
.checkout-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 2rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.social-links a {
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Admin Styles */
.sidebar {
    min-height: calc(100vh - 56px);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link {
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: #f8fafc;
}

.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-left-info {
    border-left: 4px solid #0ea5e9 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-slide {
        height: 50vh;
        min-height: 400px;
    }

    .category-card {
        margin-bottom: 1rem;
    }

    .product-preview-container {
        position: static;
        margin-bottom: 2rem;
    }

    .sidebar {
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .hero-slide h1 {
        font-size: 2rem;
    }

    .hero-slide .lead {
        font-size: 1rem;
    }

    .category-card {
        padding: 1.5rem 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Custom Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

/* Text Utilities */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Announcement Bar Carousel */
.announcement-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.announcement-item {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.announcement-item.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Text Customization Controls */
.text-area-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.3s ease;
}

.text-area-group:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.text-area-group h6 {
    color: var(--primary-color);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.form-range {
    height: 6px;
}

.form-range::-webkit-slider-thumb {
    background: var(--primary-color);
    border: none;
    width: 18px;
    height: 18px;
}

.form-range::-moz-range-thumb {
    background: var(--primary-color);
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.form-control-color {
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.form-control-color:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.font-size-display {
    font-weight: 600;
    color: var(--primary-color);
}

/* Live Preview Canvas */
.live-preview-wrapper {
    position: relative;
    display: inline-block;
}

#preview-canvas {
    border-radius: inherit;
}

/* Product Variants */
.variant-selector {
    gap: 12px;
}

.variant-option {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.variant-option:hover .variant-preview {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.variant-option[data-selected="true"] .variant-preview {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Interactive Text Controls */
.text-input-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.text-input-group:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.text-controls {
    background: white;
    border-radius: 6px;
    padding: 12px;
}

/* Character count styling */
.char-count {
    font-weight: 600;
    transition: color 0.3s ease;
}

/* Touch-friendly controls */
@media (max-width: 768px) {
    .variant-selector {
        justify-content: center;
    }

    .variant-preview {
        width: 50px !important;
        height: 50px !important;
    }

    .text-input-group {
        margin-bottom: 20px;
    }

    .form-range {
        height: 8px;
    }
}

/* AI Chat Widget Styles */
.ai-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease;
}

.message-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-message .message-icon {
    background: var(--gradient-primary);
    color: white;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-icon {
    background: var(--gradient-secondary);
    color: white;
}

.message-content {
    background: white;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 75%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.chat-input-container input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 10px 16px;
}

.chat-input-container button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-indicator .message-content {
    padding: 16px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: typingDots 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDots {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

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

@media (max-width: 768px) {
    .chat-container {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
    }
}
/* Nested Dropdown Menus */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    margin-left: 0;
}

/* Show submenu on hover for desktop */
@media (min-width: 992px) {
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
    
    .dropdown-submenu > .dropdown-item.dropdown-toggle::after {
        display: inline-block;
        margin-left: 0.5em;
        vertical-align: 0.255em;
        content: "";
        border-top: 0.3em solid transparent;
        border-right: 0;
        border-bottom: 0.3em solid transparent;
        border-left: 0.3em solid;
        float: right;
        margin-top: 0.4em;
    }
}

/* Mobile responsive dropdown */
@media (max-width: 991px) {
    .dropdown-submenu .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-left: 1rem;
        border-left: 2px solid var(--primary-color);
    }
    
    .dropdown-submenu > .dropdown-item.dropdown-toggle::after {
        content: " \25BC";
        float: right;
        font-size: 0.8em;
        margin-top: 0.3em;
    }
}
