/* ShopFront Shared Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #667eea;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.header-btn:hover {
    color: #667eea;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.product-image {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 3rem;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
}

.add-to-cart {
    width: 100%;
    padding: 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #5a6fd8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 2rem;
    font-weight: bold;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.modal-close:hover {
    background-color: #f8f9fa;
    color: #333;
}

.welcome-text {
    padding: 0 2rem 1.5rem 2rem;
    color: #666;
    font-size: 1rem;
    text-align: center;
}

.auth-options {
    padding: 0 2rem 2rem 2rem;
}

.btn-social {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    transition: opacity 0.3s;
}

.btn-social:hover {
    opacity: 0.9;
}

.btn-social.facebook {
    background: #1877f2;
    color: white;
}

.btn-social.google {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
}

.btn-social.google:hover {
    border-color: #ddd;
}

.separator {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.separator span {
    background: white;
    padding: 0 1rem;
    color: #666;
    font-size: 0.875rem;
}

.login-btn {
    background: #e91e63;
    color: white;
    border: none;
    margin-bottom: 0.75rem;
}

.login-btn:hover {
    background: #d81b60;
}

.signup-btn {
    background: white;
    color: #333;
    border: 1px solid #333;
}

.signup-btn:hover {
    background: #f8f9fa;
}

.legal-text {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    line-height: 1.4;
}

.legal-link {
    color: #e91e63;
    text-decoration: none;
}

.legal-link:hover {
    text-decoration: underline;
}

.form-container {
    padding: 0 2rem 2rem 2rem;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
    margin-top: 0.5rem;
}

.btn-link:hover {
    color: #5a6fd8;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    width: 100%;
    padding: 0.75rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    margin-top: 0.5rem;
}

.btn-secondary:hover {
    background: #5a6268;
}

.message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Email First Modal */
#emailFirstModal .modal-content {
    max-width: 400px;
    text-align: center;
}

.email-icon {
    margin: 20px 0;
}

.envelope-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e3f2fd, #fce4ec);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
}

.at-symbol {
    font-size: 32px;
    color: #e91e63;
    font-weight: bold;
}

.email-first-content h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #333;
}

.email-first-content p {
    color: #666;
    margin-bottom: 30px;
}

#emailFirstForm .form-group {
    margin-bottom: 20px;
}

#emailFirstInput {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

#emailFirstBtn {
    width: 100%;
    padding: 12px;
    background: #ccc;
    color: #999;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: not-allowed;
}

#emailFirstBtn:enabled {
    background: #007bff;
    color: white;
    cursor: pointer;
}

/* Email Verification Modal */
#emailVerificationModal .modal-content {
    max-width: 400px;
    text-align: center;
}

.email-verification-content h2 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.3;
}

.email-verification-content p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.verification-btn {
    width: 100%;
    padding: 12px;
    background: #e91e63;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.verification-btn:hover {
    background: #c2185b;
}

/* Modal Back Button */
.modal-back {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #333;
    padding: 5px;
}

.modal-back:hover {
    color: #007bff;
}

/* Complete Registration Modal */
#completeRegistrationModal .modal-content {
    max-width: 450px;
}

.passwordless-option {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.checkbox-text {
    font-size: 16px;
}

.passwordless-benefits {
    margin-top: 15px;
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.benefit-item i {
    color: #28a745;
    margin-right: 8px;
    font-size: 12px;
}

.password-strength {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

#createAccountBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#createAccountBtn:disabled:hover {
    background: #ccc;
    transform: none;
}

/* Login Token Modal */
#loginTokenModal .modal-content {
    max-width: 400px;
    text-align: center;
}

#loginTokenEmail {
    font-weight: 600;
    color: #e91e63;
}
