/* Shop CSS - consistent with wedlinovo.pl */
:root {
    --shop-primary: #8B0000;
    --shop-accent: #DC143C;
    --shop-secondary: #795548;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 48px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('/images/background.jpg');
    background-repeat: repeat;
    opacity: 0.15;
    z-index: -1;
}

/* Cart link in header */
.nav-links a.shop-cart-link,
a.shop-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    background: rgba(255, 255, 255, 0.14);
    color: white !important;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
}
.nav-links a.shop-cart-link:hover,
a.shop-cart-link:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.9);
    color: white !important;
    transform: none;
    box-shadow: none;
}
.nav-links a.shop-cart-link::after,
a.shop-cart-link::after {
    display: none;
}
.shop-cart-link i {
    font-size: 1em;
}

/* Hero */
.shop-hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('/images/baner_glowny.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 5rem 0;
}
.shop-hero h1 {
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}
.shop-hero p {
    font-size: 1.2em;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Sections */
.shop-section {
    padding: 60px 0;
}
.shop-section-alt {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}
.shop-section h2 {
    font-size: 2.2em;
    margin-bottom: 40px;
    text-align: center;
    color: #333;
    font-weight: 700;
    position: relative;
    display: inline-block;
    width: 100%;
}
.shop-section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--shop-primary), var(--shop-accent));
    border-radius: 2px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}
.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.product-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-card-content h3 {
    font-size: 1.2em;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.3;
}
.product-card-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}
.product-card-content h3 a:hover {
    color: var(--shop-primary);
}
.product-card-content .description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
    min-height: 40px;
}
.product-card-content .price {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--shop-primary);
    margin-bottom: 16px;
}

/* Buy Button */
.btn-buy {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--shop-primary) 0%, var(--shop-accent) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139,0,0,0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}
.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139,0,0,0.35);
}

/* Category Filter */
.categories-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}
.cat-btn {
    padding: 10px 24px;
    border: 2px solid var(--shop-primary);
    background: white;
    color: var(--shop-primary);
    cursor: pointer;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.cat-btn.active {
    background: linear-gradient(135deg, var(--shop-primary), var(--shop-accent));
    color: white;
    border-color: var(--shop-primary);
    box-shadow: 0 4px 12px rgba(139,0,0,0.3);
}
.cat-btn:hover:not(.active) {
    background: rgba(139,0,0,0.1);
    transform: translateY(-2px);
}

/* Product Detail */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    width: fit-content;
    max-width: 100%;
}
.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--shop-primary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.breadcrumb-item i {
    font-size: 0.9em;
}
.breadcrumb-item:hover:not(.current) {
    background: rgba(139, 0, 0, 0.08);
    text-decoration: none;
}
.breadcrumb-item.current {
    color: #1a1a1a;
    font-weight: 600;
    cursor: default;
}
.breadcrumb-sep {
    color: #cbd5e1;
    font-size: 10px;
}
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}
.product-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.product-thumbnails img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.product-thumbnails img.active {
    border-color: var(--shop-primary);
}
.product-detail-info {
    display: flex;
    flex-direction: column;
}
.product-detail-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.3;
}
.product-category-label {
    font-size: 14px;
    color: var(--shop-primary);
    font-weight: 500;
    margin-bottom: 8px;
}
.product-meta {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 24px;
}
.product-description {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 32px;
    flex: 1;
}
.product-badges {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #6c757d;
}
.product-add-form {
    display: flex;
    gap: 12px;
    align-items: center;
}
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}
.quantity-selector button {
    width: 40px;
    height: 44px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 18px;
}
.quantity-selector input {
    width: 56px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    -moz-appearance: textfield;
}
.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.quantity-selector input {
    width: 72px;
}
.quantity-selector .quantity-unit {
    padding: 0 12px;
    height: 44px;
    line-height: 44px;
    background: #f8f9fa;
    border-left: 1px solid #dee2e6;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
}

/* Cart */
.cart-items-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 24px;
}
.cart-item {
    background: #f8f9fa;
    padding: 24px;
    margin-bottom: 16px;
    border-radius: 12px;
    display: flex;
    gap: 24px;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.cart-item-accent {
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--shop-primary);
}
.cart-item-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.cart-item-thumb:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cart-item-info h3 a:hover {
    color: var(--shop-primary) !important;
}
.cart-item-info {
    flex: 1;
    min-width: 0;
    padding-left: 12px;
}
.cart-item-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}
.cart-item-desc {
    color: #6c757d;
    font-size: 14px;
    margin: 0 0 12px;
}
.cart-item-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.cart-item-price .item-subtotal {
    font-size: 22px;
    font-weight: 700;
    color: var(--shop-primary);
}
.cart-item-price .item-qty-label {
    font-size: 14px;
    color: #6c757d;
}
.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    min-width: 360px;
}
.cart-item-actions .qty-row {
    display: grid;
    grid-template-columns: 110px 90px 40px 1fr;
    align-items: center;
    column-gap: 10px;
}
.cart-item-actions .qty-row label {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
    text-align: left;
}
.cart-item-actions input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    background: white;
    box-sizing: border-box;
}
.cart-item-actions .unit-suffix {
    font-size: 13px;
    color: #6c757d;
}
.cart-item-actions .packages-list {
    background: #f1f3f5;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cart-item-actions .package-row {
    display: grid;
    grid-template-columns: 110px 90px 40px 1fr;
    align-items: center;
    column-gap: 10px;
}
.cart-item-actions .package-row .package-label {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}
.cart-item-actions .package-row .package-subtotal {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 700;
    text-align: right;
}
.cart-item-actions .sum-status {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    min-height: 0;
}
.cart-item-actions .sum-status:empty {
    display: none;
}
.cart-item-actions .cart-item-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}
.cart-remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
}
.cart-clear-btn {
    background: none;
    color: #6c757d;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cart-total-bar {
    background: var(--shop-primary);
    padding: 16px 24px;
    border-radius: 10px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.cart-checkout-btn {
    background: white;
    color: var(--shop-primary);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.cart-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.cart-checkout-btn.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: auto;
}
.cart-checkout-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}
.cart-empty {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.cart-empty-icon {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 24px;
}
.cart-empty h3 {
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}
.cart-empty p {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 32px;
}

/* Checkout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 30px;
}
.checkout-form-section {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.checkout-form-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: auto;
}
.checkout-form-section h2::after {
    display: none;
}
.checkout-form-section h2 i {
    color: var(--shop-primary);
}
.form-group {
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}
.form-control:focus {
    outline: none;
    border-color: var(--shop-primary);
    box-shadow: 0 0 0 4px rgba(139,0,0,0.1);
}
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.checkout-summary {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
    height: fit-content;
}
.checkout-summary h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    text-align: left;
    width: auto;
}
.checkout-summary h2::after {
    display: none;
}
.checkout-summary h2 i {
    color: var(--shop-primary);
}
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}
.summary-item span:first-child {
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}
.summary-item span:last-child {
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
}
.summary-total {
    border-top: 3px solid var(--shop-primary);
    margin-top: 16px;
    padding-top: 16px;
    background: linear-gradient(135deg, rgba(139,0,0,0.05), rgba(220,20,60,0.05));
}
.summary-total span:last-child {
    font-size: 22px;
    font-weight: 700;
    color: var(--shop-primary);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 2000;
    max-width: 400px;
    animation: slideInRight 0.5s ease;
}
@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.flash-message {
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.flash-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}
.flash-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Responsive */
@media (max-width: 968px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .container { padding: 0 24px; }
    .shop-hero { padding: 3rem 0; }
    .shop-hero h1 { font-size: 2em; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
    .product-detail-grid { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
    .cart-item { flex-direction: column; align-items: stretch; }
    .cart-item-thumb { width: 100%; height: 200px; }
    .cart-item-info { padding-left: 0; }
    .cart-item-actions { width: 100%; min-width: 0; }
    .cart-total-bar { flex-direction: column; text-align: center; }
    .checkout-form-section { padding: 24px; }
    .checkout-summary { padding: 24px; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .shop-hero h1 { font-size: 1.6em; }
    .products-grid { grid-template-columns: 1fr; }
    .product-badges { flex-direction: column; gap: 8px; }
    .product-add-form { flex-direction: column; }
    .product-add-form .btn-buy { width: 100%; }
}
