/*
   Hands-on Project 9-5
   Sung Kim | 7-19-26 | IST-239-W01

   Purpose:
   This project uses session storage to build and display a shopping cart for a winter clothing website.
   Customers can select a product, quantity, size, and color from one of four product pages.
   Each selected item is stored in session storage and assigned a numbered cart item key.
   The shopping cart page retrieves the stored items and displays their product information in a table.

   This file controls the layout and appearance of the product pages and shopping cart page.

   Filename: styles.css
   Related: product01.html, product02.html, product03.html, product04.html, cart.html
*/

/* Applies the border-box sizing model to all page elements */
* {
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
}

/* Resets default spacing, borders, fonts, and alignment for common elements */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
   margin: 0;
   padding: 0;
   border: 0;
   font-size: 100%;
   font: inherit;
   vertical-align: baseline;
}

/* Displays HTML5 structural elements as block elements in older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
   display: block;
}

/* Sets the main page width, background, spacing, and font */
body {
   line-height: 1;
   width: 960px;
   background: white;
   margin: 0 auto;
   font-family: Verdana, Geneva, sans-serif; 
}

/* Removes default markers from ordered and unordered lists */
ol, ul {
   list-style: none;
}

/* Styles the project header at the top of the page */
header {
   background: #5472B2;
   width: 100%;
   color: #FFFFFF;
   font-size: 48px;
   text-align: center;
   line-height: 1.5em;
   margin-bottom: 0;
}

/* Styles the main product and shopping cart content area */
section {
   background-color: #FFDB70;
   margin-top: 0;
   padding-bottom: 20px;
   user-select:none;
   height: 440px;
}

/* Arranges the navigation links in one horizontal row */
section nav ul {
   display: flex;
   flex-flow: row nowrap;
}

/* Styles each navigation menu item */
section nav ul li {
   display: inline-block;
   width: 20%;
   padding: 8px 0;
   text-align: center;
   background-color: rgba(0, 0, 0, 0.3);
}

/* Styles the navigation links */
section nav ul li a {
   text-decoration: none;
   color: ivory;
   cursor: pointer;
}

/* Changes the navigation link color when the pointer hovers over it */
section nav ul li a:hover {
   color: #FFDB70;
}

/* Styles the main heading inside each page section */
section h1 {
   font-size: 2.8em;
   text-align: center;
   margin: 0;
   padding: 20px 0;
}

/* Styles the product description paragraph */
#intro {
   font-size: 1em;
   width: 88%;
   margin: 0 auto 15px;
   border-bottom: 1px solid gray;
   padding-bottom: 8px;
   line-height: 1.3;
   text-align: justify;
}

/* Sets the width and spacing of the product order table */
table#ordertable {
   width: 80%;
   margin: 10px auto;
}

/* Styles the heading cells in the product order table */
table#ordertable th {
   text-align: left;
   width: 150px;
   padding: 4px;
}

/* Removes the normal form styling from disabled product and price fields */
input[disabled] {
   background-color: transparent;
   border: none;
   font-size: 1em;
}

/* Sets the font size of selection lists */
select {
   font-size: 1em;
}

/* Styles and centers the Add to Shopping Cart button */
input#submitButton {
   display: block;
   margin: 10px auto;
   font-size: 1em;
   height: 30px;
}

/* Sets the size and layout of the generated shopping cart table */
table#cartTable {
   width: 80%;
   margin: 0 auto;
   border-collapse: collapse;
}

/* Styles the shopping cart table headings */
table#cartTable th {
   background-color: rgba(0, 0, 0, 0.3);
   font-weight: bold;
   border: 1px solid gray;
   padding: 4px;
}

/* Styles the shopping cart table data cells */
table#cartTable td {
   border: 1px solid gray;
   background-color: rgba(255, 255, 255, 0.3);
   padding: 4px;
}

/* Sets the width of the product-name column */
table#cartTable td:nth-of-type(1) {
   width: 300px;
}

/* Right-aligns the quantity and price columns */
table#cartTable td:nth-of-type(3), table#cartTable td:nth-of-type(4) {
   text-align: right;
}
