/* Custom styles for Sopwer Market */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    background-color: #f8f9fa;
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.75rem;
}

/* Product card styles */
.product-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    overflow: hidden;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.product-thumb {
    height: 200px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
    transition: transform 0.3s ease;
}

.product-card:hover .product-thumb {
    transform: scale(1.05);
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.card-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.card-text strong {
    color: #007bff;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 0.5rem;
}

.rating {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #f39c12;
    margin-bottom: 0.25rem;
}

.rating i {
    margin-right: 0.25rem;
}

.store {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
}

.store i {
    margin-right: 0.25rem;
}

/* Discount badge */
.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

.btn-primary {
    align-self: flex-start;
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    border: none;
    box-shadow: 0 4px 15px rgba(101, 41, 255, 0.4);
    transition: background 0.3s ease;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-primary i {
    font-size: 1.1rem;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #2575fc, #6a11cb);
    box-shadow: 0 6px 20px rgba(101, 41, 255, 0.6);
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.product-images {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.product-images img {
    max-height: 150px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    width: auto;
    max-width: 100%;
}

.product-images img:hover {
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .product-images {
        gap: 8px;
        max-width: 100%;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .product-images img {
        max-height: 80px;
        width: auto;
        flex-shrink: 0;
    }
}

.chat-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    height: 400px;
    overflow-y: auto;
    padding: 10px;
    background-color: #fff;
}

.message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 70%;
    word-wrap: break-word;
    font-size: 0.9rem;
}

.message small {
    color: #888;
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
}

.message.user {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    margin-left: auto;
    text-align: right;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.message.admin {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    margin-right: auto;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

input[type="file"] {
    padding: 3px;
}

img#logo-preview {
    max-width: 100px;
    margin-top: 10px;
}

@media (max-width: 576px) {
    .row {
        margin-left: 0;
        margin-right: 0;
        overflow: hidden;
    }
    .col-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-bottom: 15px;
    }
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Magnifier for image zoom */
.magnifier {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    background-repeat: no-repeat;
    background-color: rgba(255,255,255,0.8);
    display: none;
    pointer-events: none;
    z-index: 10;
}

/* Client logos */
.client-logo {
  padding: 20px;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-logo:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.client-logo img {
  max-height: 80px;
  object-fit: contain;
}

/* Floating Chat Button */
.chat-floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

.chat-floating-button .btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Bank selection styles - ATM Card Design */
.bank-option {
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #404040 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    height: 140px;
    width: 220px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}

.bank-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    border-radius: 10px 10px 0 0;
}

.bank-option:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #ffd700 !important;
}

.bank-option.selected {
    border-color: #ffd700 !important;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.bank-option.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: #ffd700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
}

.bank-icon {
    color: #ffd700;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
    align-self: flex-end;
}

.bank-option:hover .bank-icon {
    color: #ffed4e;
    transform: scale(1.1);
}

.bank-option .bank-icon i {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bank-option div:last-child {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    width: 100%;
}

.bank-option div:last-child div:first-child {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #ffffff;
}

.bank-option div:last-child div:last-child {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: #cccccc;
}

/* Checkout page improvements */
.bank-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.module-category-card {
    transition: all 0.3s ease;
    border-left: 4px solid #007bff !important;
}

.module-category-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-info .mb-2 {
    line-height: 1.4;
}

.total-price-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
