/* 
 * HEIDMARK IMKEREI - UNIFIED GLOBAL STYLES
 * Shared styles for all pages: index.html, warenkorb.html, etc.
 * Version: 1.0 - August 2025
 */

/* ==========================================================================
   GLOBAL RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: #D2691E;
    border-radius: 4px;
}

*::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

/* ==========================================================================
   BODY & LAYOUT FOUNDATION
   ========================================================================== */
body {
    /* Wallpaper system will override this background */
    background: linear-gradient(135deg, #FFF8DC 0%, #F4A460 50%, #DEB887 100%);
    min-height: 100vh;
    font-family: "Open Sans", Arial, sans-serif;
    position: relative;
    overflow-x: hidden;
    color: #000000;
    font-weight: normal;
    font-size: 13px;
    line-height: 1.1875;
    margin: 0;
    padding: 0;
}

/* Wallpaper integration - controlled by wallpaper-ultra.js */
body.wallpaper-active {
    background: var(--wallpaper-url, linear-gradient(135deg, #FFF8DC 0%, #F4A460 50%, #DEB887 100%));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Animated Background Elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(210, 105, 30, 0.1) 0%, 
        rgba(255, 248, 220, 0.1) 25%, 
        rgba(244, 164, 96, 0.1) 50%, 
        rgba(222, 184, 135, 0.1) 75%, 
        rgba(210, 105, 30, 0.1) 100%);
    animation: gradientShift 15s ease infinite;
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 248, 220, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(244, 164, 96, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(210, 105, 30, 0.2) 0%, transparent 50%);
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

/* Keyframe Animations */
@keyframes gradientShift {
    0%, 100% { transform: translateX(0%) translateY(0%); opacity: 0.8; }
    25% { transform: translateX(-5%) translateY(-2%); opacity: 0.9; }
    50% { transform: translateX(5%) translateY(2%); opacity: 0.7; }
    75% { transform: translateX(-2%) translateY(5%); opacity: 0.8; }
}

@keyframes particleFloat {
    0% { transform: translateX(-10%) translateY(-10%) rotate(0deg); }
    100% { transform: translateX(10%) translateY(10%) rotate(360deg); }
}

/* ==========================================================================
   UNIFIED BUTTON STYLES - Used across all pages
   ========================================================================== */
.btn-primary,
.btn-secondary,
button.btn-primary,
button.btn-secondary,
.contact-btn,
.honey-btn,
.shopping-cart-btn,
.cart-btn,
.add-to-cart,
.checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #D2691E 0%, #FF8C00 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(210, 105, 30, 0.3);
}

.btn-primary:hover,
.btn-secondary:hover,
button.btn-primary:hover,
button.btn-secondary:hover,
.contact-btn:hover,
.honey-btn:hover,
.shopping-cart-btn:hover,
.cart-btn:hover,
.add-to-cart:hover,
.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(210, 105, 30, 0.4);
    background: linear-gradient(135deg, #FF8C00 0%, #D2691E 100%);
}

/* Secondary button variant */
.btn-secondary {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #A0522D 0%, #8B4513 100%);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

/* Icon styles for buttons */
.btn-primary i,
.btn-secondary i,
.contact-btn i,
.honey-btn i,
.shopping-cart-btn i {
    margin-right: 8px;
    font-size: 16px;
}

/* ==========================================================================
   LINKS & TYPOGRAPHY
   ========================================================================== */
a {
    color: #D2691E;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #FF8C00;
    text-decoration: underline;
}

/* ==========================================================================
   CONTAINER & LAYOUT UTILITIES
   ========================================================================== */
.container {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Ensure content appears above background animations */
#headerLayoutGrid, #welcomeLayoutGrid, #menuLayoutGrid, 
#aboutLayoutGrid1, #shopLayoutGrid1, #shopLayoutGrid2, #galleryLayoutGrid1, 
#galleryLayoutGrid2, #specialsLayoutGrid, #infoLayoutGrid, #contactLayoutGrid1, 
#contactLayoutGrid2, #socialsLayoutGrid, #footerLayoutGrid {
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   FORM STYLES - Used in contact forms, checkout, etc.
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #D2691E;
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* ==========================================================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    body {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .btn-primary,
    .btn-secondary,
    .checkout-btn {
        padding: 14px 20px;
        font-size: 16px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .container {
        margin: 10px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .btn-primary,
    .btn-secondary,
    .checkout-btn {
        padding: 16px 24px;
        font-size: 16px;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-center {
    text-align: center;
}

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

.text-right {
    text-align: right;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.p-3 {
    padding: 1rem;
}
